Forums

Exclude a category from blog loop BUT list in widget (2 posts)

  1. shepherdjim
    Member
    Posted 2 years ago #

    I have a category "announcements" whose latest post shows up on my static "front/home page." I do NOT want posts in the "announcements" category to show in the main "blog" BUT I would like, when visitors clicks on "Announcements" in the sidebar "Category widget" they would be able to see a multi-post listing of all the posts in the category.

    The site is http://www.shepherdjim.com/ -- I have figured out how to completely exclude posts in the "announcements" category ...tho currently (9/18/2009 -- 11am EDT) I have "announcements" showing everywhere.

    Tnx JIm

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    I do NOT want posts in the "announcements" category to show in the main "blog"

    If you are using something like the loop that's in the WordPress Default theme's index.php, then this, before the loop would work to exclude category ID 4:

    query_posts($query_string . '&cat=-4')

    Related:
    http://wordpress.org/extend/plugins/advanced-category-excluder/

Topic Closed

This topic has been closed to new replies.

About this Topic