Thread Starter
MarkRH
(@markrh)
On my local site (on my PC) it also fails when using a different theme (the 2014 default) and with all plug-ins deactivated.
Thread Starter
MarkRH
(@markrh)
I guess as a work-around I can either click on the Category link in the list or view the Categories directly and then click on the Count on the right side to list all the posts in that category. Still, the drop-down and filter button should work. Seems to be a bug.
Thread Starter
MarkRH
(@markrh)
Figured it out. It was caused be the following in my theme’s functions.php file:
function remove_my_categories( $wp_query ) {
$remove_cat = '-61,-74';
// remove from archives (except category archives), feeds, search, and home page
if( is_home() || is_feed() || is_search() || ( is_archive() && !is_category() )) {
// if( is_home() || is_feed() || ( is_archive() && !is_category() )) {
set_query_var('cat', $remove_cat);
}
}
add_action('pre_get_posts', 'remove_my_categories' );
I modified it to the following after noticing some other anomalies:
function remove_my_categories( $wp_query ) {
$remove_cat = '-61,-74';
// remove from archives (except category archives), feeds, search, and home page
if( (is_home() || is_feed() || is_search() || ( is_archive() && !is_category() )) && !is_admin()) {
// if( is_home() || is_feed() || ( is_archive() && !is_category() )) {
set_query_var('cat', $remove_cat);
}
}
add_action('pre_get_posts', 'remove_my_categories' );
Apparently my theme’s function to exclude categories was affecting the admin’s post list as well which I did not expect. Adding the is_admin() exception solved it.