I replaced the logo with a function to call custom content per your suggestion. It’s working great and looks great but I want to add the link back to home so that it’s used like a home button. How do I do this?
Thanks!
Gabe
Hey connect4consulting!
Thank you for using Enfold.
What is the code that you use to add the custom content? Please post it on pastebin.com. Try to add a link tag:
<div class="custom_content"><h1><a href="URL OF HOME PAGE">CRITICAL CONNECTIONS</a></h1></div>
Best regards,
Ismael
Hi Ismael,
Here’s the code I used. How do I modify this in functions.php?
function add_aditional_content_to_header($logo, $use_image, $headline_type, $sub, $alt, $link){
$logo .= “<div class=’custom_content’>”;
$logo .= “<h1>CRITICAL CONNECTIONS</h1>”;
$logo .= “</div>”;
return $logo;
}
add_filter(‘avf_logo_final_output’, ‘add_aditional_content_to_header’, 100, 6);
Hey!
Please change the code to following one
function add_aditional_content_to_header($logo, $use_image, $headline_type, $sub, $alt, $link){
$logo .= "<div class='custom_content'>";
$logo .= "<h1>";
$logo .= "<a href='".home_url()."'>CRITICAL CONNECTIONS</a>";
$logo .= "</h1>";
$logo .= "</div>";
return $logo;
}
add_filter('avf_logo_final_output', 'add_aditional_content_to_header', 100, 6);
Regards,
Yigit
Thanks Yigit.
Very helpful. I’m assuming that if I wanted to place an image in the header instead of the logo, I would just change $logo to $use_image?