Archived topic
Logo in Header Element - Link Area is not big enough
5 replies · Started by Mary Pearson on June 26, 2019
I created a slider for my logo. I took some info I found on the forums and added the following to my functions.php file, but I honestly don't know what I'm doing so it's probably wrong. I simply want the logo to take people to home page.
// Make Logo Element a Link
add_filter( 'generate_logo_href','generate_add_custom_logo_href' );
function generate_add_custom_logo_href()
{
if ( is_category() ) {
return ' http://167.114.208.131/~melissa/';
}
// Otherwise, return our default logo
return $logo;
}
It works as a link, but only if you hover over the very bottom of the image. I want it so that when you hover over any part of the logo it shows as a link.
Would appreciate your help. Thanks!
Hi there,
You don't need that function at all so please remove it.
The reason why only part of the logo is a link because you've created a header element with the merge option turn on:
https://docs.generatepress.com/article/header-element-overview/#merge-with-content
Doesn't look you need the header element at all so simply remove it should do the job.
Let me know if this helps :)
How do I use the slider then for the logo?
Try using the before_logo or after_logo hook to insert it instead:
https://docs.generatepress.com/article/hooks-visual-guide/
Thanks Leo. before and after logo didn't work but header did. All is good. Many thanks!!!!
No problem :)