Fix post type query warning
This commit is contained in:
@@ -243,7 +243,7 @@ function sportspress_no_terms_links( $term_list, $taxonomy ) {
|
|||||||
add_filter( 'the_terms', 'sportspress_no_terms_links', 10, 2 );
|
add_filter( 'the_terms', 'sportspress_no_terms_links', 10, 2 );
|
||||||
|
|
||||||
function sportspress_pre_get_posts( $query ) {
|
function sportspress_pre_get_posts( $query ) {
|
||||||
$post_type = $query->query['post_type'];
|
$post_type = sp_array_value( $query->query, 'post_type', null );
|
||||||
|
|
||||||
if ( is_sp_post_type( $post_type ) ):
|
if ( is_sp_post_type( $post_type ) ):
|
||||||
$query->set( 'suppress_filters', 0 );
|
$query->set( 'suppress_filters', 0 );
|
||||||
|
|||||||
Reference in New Issue
Block a user