Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disable the Header Element if there isn't a featured image.
add_filter( 'generate_header_element_display', function( $display ) {
if ( ! has_post_thumbnail() ) {
return false;
}
return $display;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.