Archive Loop displaying everything
-
Hey everyone,
Having some trouble with my Archive loop in my custom theme. It’s been working fine, but I’ve just noticed that instead of being context specific (displaying posts from a certain category, by a certain author etc.) it’s now just showing everything that’s ever been posted on the site.
I’ve been trying to find the problem for hours now, but I’m completely stumped.
Here’s the code:
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } else if ( get_query_var('page') ) {$paged = get_query_var('page'); } else {$paged = 1; } $archiveArgs = array( 'posts_per_page' => 8, 'paged' => $paged, 'post_type' => array('post','review') ); $archiveLoop = new WP_Query(); $archiveLoop->query( $archiveArgs ); while ( $archiveLoop->have_posts() ) : $archiveLoop->the_post(); ?>
Any ideas?
Thanks for taking the time have a look!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Archive Loop displaying everything’ is closed to new replies.