Tag/Category/Other Specific Pages Displaying ALL Posts (4 posts)

  1. evhan
    Posted 8 years ago #

    I'm having trouble with the pages on which only a few results should show. The page for a given tag or category, for instance, shows ALL posts, just as though it were my index page displaying a very general loop.

    My site is here. If you click one of the tag names or categories under one of the posts, it will just show you a page identical to the index page but with a different URL, one specific to the tag or category. Additionally, clicking any of the archive categories (those printed with wp_get_archives() ) cause the same problem (as seen here).

    I don't believe this is a problem with permalinks as I've tried resetting them to the default and the problem persisted. I'm under the impression that WP performs this function on its own, generating pages displaying only certain results for tags and whatnot.

    Thanks in advance.

  2. evhan
    Posted 8 years ago #


  3. Kafkaesqui

    Posted 8 years ago #

    Look at the source of the archive.php template of your theme, or if it does not sport one the index.php, and see if it is using something like query_posts() to initialize The Loop.

  4. evhan
    Posted 8 years ago #

    Sure enough. I was using that function to limit the number of posts displayed.

    So for anyone else who has this problem, the solution is simply to remove "query_posts()" from your archive.php page, or if you're not using one remove it from your index.

    Easy fix.

Topic Closed

This topic has been closed to new replies.

About this Topic