[infinite scroll] doesn't load custom post types
-
Hi,
I have infinite scroll up and running, only problem is that is loads posts but not posts in a custom post type. Any ideas on how to solve this?This is what my index.php looks like:
<?php get_header();?> <section id="main"> <?php $loop = new WP_Query( array( 'post_type' => array('post','announcements'),'paged' => $paged ) ); ?> <?php if ($loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; else : ?> <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p> <?php endif; ?> </section> <?php get_footer();?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[infinite scroll] doesn't load custom post types’ is closed to new replies.