Last active
April 17, 2020 19:16
-
-
Save rafsuntaskin/e21e4d9bd901b885163474896abd0904 to your computer and use it in GitHub Desktop.
Remove unwanted body class from non event pages
This file contains hidden or 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 | |
add_action( 'wp', 'rt_remove_unwanted_body_class', 90 ); | |
function rt_remove_unwanted_body_class() { | |
if ( ! tribe_is_event() ) { | |
remove_filter( 'body_class', [ tribe( Tribe\Events\Views\V2\Hooks::class ), 'filter_body_class' ] ); | |
remove_action( 'wp_footer', [ tribe( 'asset.data' ), 'render_json' ] ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment