Exclude default category

Adding this PHP code to the functions.php of your wordpress theme will exclude the default category from your blog.

 

 

add_filter( 'list_terms_exclusions', 'exclude_default_cat' );
function exclude_default_cat( $exclusions ) {
if( !is_admin() )
$exclusions .=  "AND t.term_id != " . get_option( 'default_category' ) . " ";
return $exclusions;
}

Leave a comment