/** * Custom render function for Infinite Scroll. * * @since 1.0.0 */ function buntu_infinite_scroll_render() { while (have_posts()) { the_post(); hybrid_get_content_template(); } }
if (have_posts()) { // Checks if any posts were found. ?> <?php while (have_posts()) { // Begins the loop through found posts. ?> <?php the_post(); // Loads the post data. ?> <?php hybrid_get_content_template(); // Loads the content/*.php template. ?> <?php if (is_singular()) { // If viewing a single post/page/CPT. ?> <?php comments_template('', true); // Loads the comments.php template. ?> <?php }