Black Friday Sale! Get up to $30 off GP Premium! Learn more ➝

Reply To: Have the logo show in the sticky menu

Home Forums Support Have the logo show in the sticky menu Reply To: Have the logo show in the sticky menu

Home Forums Support Have the logo show in the sticky menu Reply To: Have the logo show in the sticky menu

#97858
Tom
Lead Developer
Lead Developer

Hi there,

Sorry for not getting back to you sooner!

This is a bit of a tough one.. First, you’ll want to add your header into the navigation:

add_action('generate_inside_navigation','generate_navigation_logo');
function generate_navigation_logo()
{
?>
	<div class="site-logo">
		<img src="THE URL TO YOUR IMAGE" alt="" />
	</div>
<?php
}

Then, hide it by default:

.main-navigation .site-logo {
    display: none;
    float: left;
    line-height: 60px; /* Adjust this to your menu item height */
    margin-right: 1.5em;
}

Then we’ll show it when the sticky navigation takes effect:

.stickynav .main-navigation .site-logo {
    display: block;
}

That should do it 🙂