First off, the website I’m referring to is http://floridanavs.org/blog/.
I’m creating a loop for this blog that includes multiple post types. All the following code is within home.php (rather than index.php).
query_posts( array( 'post_type' => array( 'post', 'flnavs_podcast', 'flnavs_video', 'flnavs_resources' ) ) ); if ( have_posts() ) : $count = 0; while ( have_posts() ) : the_post(); $count++; get_template_part( 'loop', get_post_format() ); endwhile; else: ?> <div class="post"> <h2 class="title"> <?php _e('Sorry!','standardtheme'); ?> </h2> <p> <?php _e('Whoops! Something broke. Please try again!','standardtheme'); ?> </p> </div> <?php endif; // Function that handles output of pagination standard_pagination(); ?>
This loop will successfully display the first 10 posts (as defined in the Reading panel in Settings) but when I click on Older Posts I get a 404 error. I’ve tried using WP_Query instead of query_posts but the same error occurs. Any idea what’s going wrong?
- The topic ‘Loop with multiple post types not rendering archive pages’ is closed to new replies.