pre_get_posts and BBPress in Swagger Theme
I’m not 100% clear on what the problem is, but I would start with putting the conditions inside the function instead of wrapping the entire function. add_filter(‘pre_get_posts’, ‘query_post_type’); function query_post_type($query) { if (!is_admin()){ global $oswcPostTypes; if(empty( get_query_var(‘suppress_filters’ ) ) { $post_type = get_query_var(‘post_type’); //get theme options global $oswc_reviews; if($post_type ) { $post_type = $post_type; set_query_var(‘post_type’,$post_type); … Read more