show all categories except one in dynamic tabs
-
How to show all categories except one in dynamic tabs? For example: recent posts in dynamic tabs. in the drop-down menu we can choose category All/category1/category2/category8. What if I want to hide category8 in recent posts?
I’ve already excluded category8 from my front page using this codefunction dc_exclude_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '-8' ); } } add_action( 'pre_get_posts', 'dc_exclude_category' );
- The topic ‘show all categories except one in dynamic tabs’ is closed to new replies.