WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. evhan
    Member
    Posted 6 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
    Member
    Posted 6 years ago #

    Anybody?

  3. Kafkaesqui

    Posted 6 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
    Member
    Posted 6 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