Custom search filter causes menu and query_posts problems
Use is_main_query() to modify only the main query so menu will stay not affected. Try This: add_action( ‘pre_get_posts’, ‘fteh_pre_get_posts’ ); function fteh_pre_get_posts( $query ){ if( !is_admin() && $query->is_main_query() && isset( $query->query_vars[‘type’] ) ) $types = explode( ‘,’, $query->query_vars[‘type’] ); $query->set( ‘post_type’, $types ); return $query; }