Skip to content

Instantly share code, notes, and snippets.

@sybrew
Created March 21, 2020 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sybrew/bdbb9be1682c509fc25af357e2b7553b to your computer and use it in GitHub Desktop.
Save sybrew/bdbb9be1682c509fc25af357e2b7553b to your computer and use it in GitHub Desktop.
Disable TSF on Bylines queries
<?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