Revision: 18791
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 8, 2009 10:32 by crs
Initial Code
add_action('pre_get_posts', 'gloss_remove_glossary_cat' ); function gloss_remove_glossary_cat( $notused ) { global $wp_query; global $gloss_category; // Figure out if we need to exclude glossary - exclude from // archives (except category archives), feeds, and home page if( ( is_archive() )) { $wp_query->query_vars['cat'] = '-108,-18' . $gloss_category; } }
Initial URL
Initial Description
the numbers 108 and 18 are the category ids i wanted to exclude
Initial Title
Exclude Categories from the archive pages
Initial Tags
wordpress
Initial Language
PHP