Created
March 21, 2020 10:23
-
-
Save sybrew/bdbb9be1682c509fc25af357e2b7553b to your computer and use it in GitHub Desktop.
Disable TSF on Bylines queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Don't include this tag if PHP is already started... | |
add_action( 'pre_get_posts', function( $query ) { | |
if ( isset( $query->queried_object ) ) { | |
if ( $query->queried_object instanceof \Bylines\Objects\Byline ) { | |
add_filter( 'the_seo_framework_query_supports_seo', '__return_false', 999 ); | |
} | |
} | |
}, 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment