Exclude categories on archives. (1 post)

  1. laptophobo
    Posted 4 years ago #

    I'm trying to exclude a category from viewing in my archives.

    Here's the situation: I have an image slider that uses posts. But, I don't want those posts to show up in the Blog or Archives -- just in the home page slider. But when I go to the archives (I have the reading permalink set to the page Articles) the slider posts are listed with all the other blog posts.

    Although I'm not WordPress savvy, I believe my archives are deriving from the home.php and loop.php.

    I tried placing the following code to my loop.php (at the top, and then other places), and though it eliminated the category from the blog, it messes up my archives listings (year/month/categories).

    query_posts($query_string . '&cat=-6');

    I could use some help here. Thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.