Welcome! To use this support forum, please Login or Join Today!

   

Exclude Category ID’s not working

{name}
Rank

Total Posts: 9

Joined 2011-12-22

PM

 

Hi Casey,
I have set the 2 category IDs I would like to exclude from my blog roll (and saved changes). See screen shot. But, posts from those categories continue to display in the blog. The blog url:

http://wp.trcsboone.org/news/

On this page, the weather info test post, category 16, inclement weather, should not display.

What did I miss?

Thanks
Ann

Image Attachments

Screen_shot_2012-01-24_at_10.15_.32_PM_.png

Click thumbnail to see full-size image

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

HI, can you try this and let me know if it works for you.

Go to Appearance → Editor → home.php and find this line:

    query_posts($query_string.'&cat;='.st_exclude_blogcats());

and change to:

    query_posts('&cat;='.st_exclude_blogcats());
{name}
Rank

Total Posts: 9

Joined 2011-12-22

PM

 

Thank you, but no luck. The post category still appears in the blog roll. Anything else I can try?

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Is the /news URL a category page or your blog home? The exclude categories should only work on your blog home. Can you explain how you have your blog/news section set up? Feel free to PM me your wp-admin details if you’d like and I’ll be glad to take a closer look.

{name}
Rank

Total Posts: 9

Joined 2011-12-22

PM

 

Thank you Casey. The /news url is the blog home. In the Reading Settings page, the “front page displays” are set to “a static page” and the Posts page = News.

The category IDs I would like to exclude from the /news page are 16 and 19. I have one post for each category, but they are set as “draft” so they won’t appear on the News page. Feel free to change them to Published to run some tests. I will PM you with wp-admin details so you can take a look.

I appreciate it.
Ann

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

PM received, thanks. There was a stray semicolon in my previous post. It looks like my forum was trying to convert &cat; to an HTML entity. To clarify,

query_posts('&cat;='.st_exclude_blogcats());

should be:

query_posts('&cat='.st_exclude_blogcats());


You should be good to go now. Thanks for your patience.