Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function r12t_exclude_category($query) {
- if ( ! is_admin() && $query->is_main_query() ) {
- if ( is_front_page() ) {
- $query->set( 'cat', '-1' );
- }
- }
- return $query;
- }
- add_filter( 'pre_get_posts', 'r12t_exclude_category' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement