How to Exclude Some Categories from Feed, Archives, Search, and Home page

January 26th, 2010 By WP Tricks Posted in Plugins, Tricks

Exclude Some Categories on Feed, Archives, Search and many more in WordPress  is another solutions to hidden our content from un necessary reader, there are some plugin that can handle it.

Recently, Miriam found an AMAZING plugin, Simply Exclude by Paul Menard, which is basically excluding heaven… or you can use Advanced Category Excluder (ACE). This plugins is the right solutions using Plugins method. There some different between two plugin. And there are is

  • Advanced Category Excluder conflicts with the Exclude Pages plugin (described below) which excludes pages  from the nav bar. Simple Exclude does not. When I activated it ACE all the pages that had been excluded with the Exclude Pages plugin appeared on the nav bar.
  • With ACE you have to first publish a post in a category, and only then will that category appear in the list of categories for exclusion. This means that if you want a category to not appear in the RSS feed etc., your first post in that category has to.
  • ACE also offers you to exclude Pages, which is so annoying since you have to go through a long list of all the pages on your site to see which you want to exclude, and they appear in long lists without any indication of parent pages and sub-pages. Also, there’s no easy way to exclude pages when you are adding or editing a page.

Sponsored Links


If you need manual method, to Exclude some categories from Feed, you can add some code on your functions.php, just open on your favorite editor and write down this code

function TricksFeedExcluder($query) {
if ($query->is_feed) {
$query->set('cat','-12');
}
return $query;
}
add_filter(‘pre_get_posts’,'TricksFeedExcluder’);

You can change 12 number depend on your categories ID that need to be exclude, and done. You can expand this tricks by exclude some categories on feed, on archives, on search page and many more, use your creativity to make it better ;) I hope trick how to exclude some categories from Feed, Archives and many more work on you. And lastly, if you didn’t happy written your own script you can use Plugins

Related Posts

  1. How To Publish The Feed Later
  2. Create Custom Page with Custom Loop and Query
  3. Custom Query String (Reloaded)
  4. Tutorial To Display a Different Number of Post on Search Result
  5. Post Thumbnail on RSS Feed
  6. How To Setup Multiple Loops in WordPress

How to Exclude Some Categories from Feed, Archives, Search, and Home page On The NET

How to Exclude Some Categories on WordPress # WordPress Tricks & Tips

Exclude Some Categories on Feed, Archives, Search and many more in WordPress is another solutions to hidden our content from un necessary reader, there are some plugin that can ... read more

Source: http://wptricks.net/how-to-exclude-some-categories-from-feed-archives-search-and-home-page/

Exclude Categories from Feed, Archives, Search, and Home page in ...

Exclude Categories from Feed, Archives, Search, and Home page in ... here are a few tips on how to exclude categories manually from the feed and the loop if you still prefer some ... read more

Source: http://wpgarage.com/plugins/exclude-categories-from-feed-archives-search-and-home-page-in-wordpress/

Front Page Excluded Categories WordPress plugin for excluding ...

Exclude Categories from Feed, Archives, Search, and Home page in WordPress ... where you want to make sure that certain categories only appear on some ... read more

Source: http://wpgarage.com/plugins/front-page-excluded-categories-wordpress-plugin-for-excluding-categories-from-home-page/

Plugins # WordPress Tricks & Tips

How to Exclude Some Categories from Feed, Archives, Search, and Home page ... Exclude Some Categories on Feed, Archives, Search and many more in WordPres s is ... read more

Source: http://wptricks.net/category/plugins/

How to Detect Category ID using the Category Slug in WordPress ...

... will show you how to find Category ID using the Category Slug in ... read more. Source: http://wptricks.net/how-to-exclude-some-categories-from-feed-archives-search-and-home-page/ read more

Source: http://wptricks.net/how-to-detect-category-id-using-the-category-slug-in-wordpress/


Amazing Touch


Add Your Comment

Gravatar