pre_get_posts with a meta_query

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

add_filter( ‘pre_get_posts’, function( $query ) {
if ( $query->is_post_type_archive( ‘player’ ) ) {
$query->set( ‘meta_query’, array (
array(
‘key’ => ‘field_5c254011804c6’,
‘compare’ => ‘!=’,
‘value’ => ‘1’
)
) );
}
} );

{{/gist}}