Hi. I'm looking for someone to figure out why this is happening. I want my category page to display the posts in that category. Below you can view the image of the code I have. For some reason, it is displaying all of the posts, not just posts specific to that category. Any suggestion is appreciated. Tom
I'm not a specialist in WP , but is this correct $recent = new WP_Query('showposts=10'); PHP: Don't you need to specify category ID or name as a param for WP_Query? Take a look at http://codex.wordpress.org/The_Loop // Get the last 10 posts in the special_cat category. <?php query_posts('category_name=special_cat&showposts=10'); ?> <?php while (have_posts()) : the_post(); ?> <!-- Do special_cat stuff... --> <?php endwhile;?> PHP:
you could also just use the query string that is also provided by wordpress. $recent = new WP_Query( $query_string . '&showposts=10' ); # if $query_string is empty, it shouldn't be on category.php, it'll simply ignore the first ampersand PHP: