Fix post type query warning

This commit is contained in:
Brian Miyaji
2014-07-09 20:39:10 +10:00
parent bc815a652f
commit 0f0d15f4f7

View File

@@ -243,7 +243,7 @@ function sportspress_no_terms_links( $term_list, $taxonomy ) {
add_filter( 'the_terms', 'sportspress_no_terms_links', 10, 2 );
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 ) ):
$query->set( 'suppress_filters', 0 );