Home | About | Help Center | Privacy Policy

September 14th, 2009

How to hide a categories posts from wordpress RSS Feeds without using any plugin


Few days back i write a tutorial on how to hide a categories posts from Home page without using any plugin, in the series of that we are going to discuss a way to hide categories from rss feeds without using any plugins.

How to hide categories from Wordpress Feeds

1.In your current theme(template) files, open functions.php

2.Copy the below mention code in your functions.php file

<?php
function my_cat_exclude($query) {
    if ($query->is_feed) {
        $query->set('cat','-ID1,-ID2,-ID3');
    }
    return $query;
}

add_filter('pre_get_posts','my_cat_exclude');
?>

add_filter(‘pre_get_posts’,'my_cat_exclude’);
?>

Where ID= your categories ID’s

Note: If  you don’t want to digg into code, use this awesome plugin named as Advanced Category Excluder which not only hides the posts from displaying on home page but can also hides the posts from search results, your RSS feed, your category, your recent post, and from web crawlers.

101wordpress How to hide a categories posts from wordpress RSS Feeds without using any plugin



You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackbackfrom your own site.

Subscribe to our FREE Rss Feed

Hot in Social Media


10 Best Social Media Case Studies

10 Tips To Become Social Without Using Social Media

Top 10 Tips To Enhance Personal Branding

Top 10 Expectations Of Social Media In 2010

What's Hot

Similar Interesting Posts

Tutorials On

7 Other Comments

One Response to “How to hide a categories posts from wordpress RSS Feeds without using any plugin”

  1. How to hide a categories posts from #wordpress RSS Feeds without using any plugin http://bit.ly/RV6ia

Leave a Reply

CommentLuv Enabled

Additional comments powered by BackType

    Follow @honeytech On Twitter

    List Of 40 Best Android Phones http://bit.ly/aWO7dk #android #phones
  • Subscribe For Tips


  • Top Fans Of The Day

Hot Tags

Web design Linux WordPress Plugin Firefox Social media Windows How to Social Designs tips blogging mistakes browser open source Internet ubuntu free iphone mobile google