Forums

Exclude categories from index (4 posts)

  1. jeffsmithdesigns
    Member
    Posted 7 years ago #

    What I would like to do is only display one certain category of posts on my main index page, but I'm not quite sure how to go about it. For example, I want all of my "Site News" posts to show up on the main index, but none of my other categories.

  2. jeffsmithdesigns
    Member
    Posted 7 years ago #

    Excellent, thanks!

  3. bmccullo
    Member
    Posted 7 years ago #

    I have my site set up to show only one post on the front page, but when I use this code snippet to limit to one category, it disregards that setting.
    It limits posts on index.php to a single category but shows more than one entry per page. Any help would be great.

  4. Kafkaesqui
    Moderator
    Posted 7 years ago #

    Sorry bmccullo, but I can't tell you what's causing that. I have no problem getting WP to output the number of posts per page set in Reading Options, even when set to 1.
    Is it possible you're using a plugin that's overriding this, or get_posts()?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.