Archived topic
Un-clickable Logo when using different media source file for sticky logo
5 replies · Started by Thoai on August 24, 2018
Hello,
I have changed my logo source file when sticky by using hooks as your instruction in below topic:
https://generatepress.com/forums/topic/change-logo-media-source-file-when-sticky/
However, the sticky logo is un-clickable now. I can't click on it to go to the homepage.
Please help me with this problem!
Thank you very much!
Thoai
Hi there,
Are you using this specific code?: https://generatepress.com/forums/topic/change-logo-media-source-file-when-sticky/#post-304545
Let me know :)
Hi Tom,
I have tried the exact code and CSS in the topic mentioned above but it does not work (Up to 2 main logo appear in the header). So, here is the code I am using:
add_action( 'generate_inside_navigation','tu_navigation_logos' );
function tu_navigation_logos() {
?>
<div class="sticky-logo navigation-logo sticky-only">
<img src="URL TO STICKY LOGO" alt="" />
</div>
<?php
}
Looking forward to your help!
Thank you!
Thoai
You can add a link to the image like this:
add_action( 'generate_inside_navigation', 'tu_navigation_logos' );
function tu_navigation_logos() {
?>
<div class="sticky-logo navigation-logo sticky-only">
<a href="URL TO YOUR HOME PAGE"><img src="URL TO STICKY LOGO" alt="" /></a>
</div>
<?php
}
Problem solved now.
Thank you very much!
You're welcome :)