Source:

http://www.locoed.com/web-design/how-to-exclude-category-posts-wordpress-tutorial-code/

Add this piece of code at the end of your ‘functions.php’ file. Replace ‘xx’ by the categories ID numbers to exclude:

1
2
3
4
5
6
7
8
9
function exclude_category($query)
{
if ( $query->is_home() )
{
$query->set('cat', '-xx -xx -xx ');
}
return $query;
}
add_filter('pre_get_posts', 'exclude_category');

Leave a comment

Twitter

An additional thing I worked on in between shots: fortune.com/2014/12/29/mil… #StarWars

Last month from Jacobo Barreiro's Twitter via Twitter for iPhone

Contact
Contact