WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] All category posts not showing correctly

[Resolved] All category posts not showing correctly

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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:

    http://codex.wordpress.org/Template_Tags/query_posts

    Thanks, wphelpcenter, that did the trick.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] All category posts not showing correctly’ is closed to new replies.