get_header_image() == "https://remove-header"
-
Hello folks!
So, I’m trying to put some conditions on whether or not to display a header image. I would like a header to be shown on categories if it exists, or the category name otherwise.
First, I had to remove the site-wise header, so that it isn’t returned as default.But, has_header_image() always returns true! The reason for that is that get_header_image() returns “https://remove-header” when the header is not set. I see this line of code on the get_header_image() function in wp-includes/theme.php:
if ( 'remove-header' == $url ) return false;
So, I presume your plugin (or maybe another one) is insidiously adding ‘https://’ in front of this string, breaking this if statement.
I’ll just add another if in my theme file for now, but maybe could you do something about it?
Thanks anyway for a very good plugin!
Adrien
- The topic ‘get_header_image() == "https://remove-header"’ is closed to new replies.