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
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.
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 FeedWhat's Hot
Similar Interesting Posts
- How to hide a categories posts from Home page without using any plugin
- How to add featured content slider into wordpress blog
- How to show Random posts without using any Wordpress plugins
- 101 List Of Awesome Wordpress Tips and Resources
- How to check Broken Links of Wordpress Blogs
- Top 20 wordpress plugins that you can’t miss
- Cool Website To Play And Download Free Online Games
- Top 40 Featured WordPress Video Tutorials
- How to show RSS feeds in a Wordpress Page and Posts
- 100+ Collected Great WordPress Video Tutorial List
- How to optimize website loading time and performance
- How To Backup All Your Valuable Comments With BackType
- Affiliate Marketing through Wordpress Tool
- Top 25 twitter tools for Wordpress
- [linkcounter] Count all links in any webpage
Tutorials On










September 14th, 2009 at 11:18 pm
How to hide a categories posts from #wordpress RSS Feeds without using any plugin http://bit.ly/RV6ia