* Include the Post-Format-specific template for the content. * If you want to override this in a child theme, then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part('template-parts/content', get_post_format()); ?> <?php } ?> <footer class='sup-posts-footer sup-ajax-posts-footer sup-pagination-left clearfix'> <?php sup_pagination(); ?> <?php sup_loadmore_button('sup-load-main'); ?> </footer> </div> <!-- sup-main-posts --> <?php sup_ajax_posts(); ?> <?php } else { ?> <?php get_template_part('template-parts/content', 'none'); ?>
function sup_ajax_posts() { $posts = apply_filters('sup_ajax_post_containers', array('popular', 'recommended')); foreach ($posts as $post) { ?> <div id="sup-<?php echo $post; ?> -posts" class="sup-<?php echo $post; ?> -posts sup-ajax-posts sup-first-view"> <?php //posts will be loaded here through javascript. ?> <footer class="sup-<?php echo $post; ?> -posts-footer sup-ajax-posts-footer clearfix" > <?php sup_loadmore_button("sup-load-{$post}"); ?> </footer> </div> <?php } }