WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. John Biddle
    Member
    Posted 4 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
    Member
    Posted 4 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:

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

  3. John Biddle
    Member
    Posted 4 years ago #

    Thanks, wphelpcenter, that did the trick.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.