• I’m trying to limit the number of posts that show on a category page. I was doing this with query_posts, like this

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    		if (have_posts()){
    			query_posts('posts_per_page=6&paged=' . $paged);

    The problem is that the query_posts seems to keep the site from realizing what category page it’s on, so it shows posts from all categories. Is there a way to fix this? It seems like there should be a way to force WordPress to “get the category” after the query_posts so that it realizes what category it’s on and will then display only the relevant posts?

    Don’t duplicate topics

  • The topic ‘Using Query posts on category page’ is closed to new replies.