You can do this in functions.php
, but you have to make sure the function is hooked into wp
. Any earlier than that and is_single
is undefined.
Try adding this to functions.php
:
/**
* Unhooks sixtenpresssermons_get_meta from the_content if currently on single post.
*/
function sx_unhook_sixtenpresssermons_get_meta() {
// Do nothing if this isn't single post
if ( ! is_single() ) {
return;
}
remove_filter( 'the_content', 'sixtenpresssermons_get_meta', 15 );
}
add_action( 'wp', 'sx_unhook_sixtenpresssermons_get_meta' );