Hi there,
I’ve been playing around with custom functions to display content before the header and trying to perhaps either use this as an image (div) or as the post background??
Example:
function after_head_image_func($content){
if(is_home())
echo ‘<div class=”header-banner”></div>’;
elseif(is_page())
echo ‘<div class=”header-banner”></div>’;
elseif(is_single())
echo ‘<div class=”header-banner”></div>’;
elseif(is_category())
echo ‘<div class=”header-banner”></div>’;
}
add_action(‘ava_after_main_container’, ‘after_head_image_func’);
My problem is that I have no idea how to incorporate the hook for the featured image on the post? I think I’ve tried everything and yet the only thing that seems to work for me is to hard code an image into this functions.php (not a solution!!)
I’m using a child theme and have this as a custom function file.
Any help would be greatly appreciated, I’m hitting my head against a wall!! :(
Kind regards,
Dan
Hi danwin7!
I think one of these plugins could be helpful to you:
https://wordpress.org/plugins/custom-header-extended/
https://wordpress.org/plugins/custom-header-images/
Hope that helps.
Best regards,
Andy