Created
February 14, 2019 22:36
-
-
Save generatepress/9fe556128433b11114b489406fc8dee4 to your computer and use it in GitHub Desktop.
Disable the Header Element if there isn't a featured image.
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
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