The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] All category posts not showing correctly (3 posts)

  1. John Biddle
    Posted 6 years ago #

    I have a categories widget in my sidebar. It correctly displays all my categories along with the correct number of posts. When I click on a category, however, only 2 items show up, instead of all of the items in that category. The items are in the right category, the only problem I know of is that only 2 are being displayed.

    It's probably not a coincidence that 2 is also the number of items I show on my home page.

    How can I correct the categories page display without changing the hope page display?

    Thanks in advance.

  2. wphelpcenter
    Posted 6 years ago #

    John -- You're correct as to why it's only showing two per page. Basically you have two options:

    - Change the setting to 10, or however many you would like to have displayed on your category page, then modify your theme's home.php (or create one if it doesn't exist)

    - Leave the setting as it is, and create/modify a category.php file.

    In whichever file you decide to modify, before the loop starts, you'll want to add a call to query_posts() to modify the number of posts returned per page. More information on this function can be found here:


  3. John Biddle
    Posted 6 years ago #

    Thanks, wphelpcenter, that did the trick.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.