Posted by on May 22, 2012

Sometimes we do not like to show wordpress posts under certain category or categories at homepage? Here are some methods.
For example, you do not need to show post under category 29.

First method, placing this code in index.php file will cause the home page to display posts from all categories except category ID 29.

If you do not need to show posts under category 50, and 29, you can use:

Second method: Using plug-in: Front Page Excluded Categories
wordpress.org/extend/plugins/front-page-excluded-categories/

Install and activate the plug-in, edit front_page_excluded_cats.php, find $cats_to_exclude, and edit the category id there, add the category you do not need to show its posts at homepage.
I have used this method for www.xuyi365.com, not show latest news on housing.

Posted in: WordPress