Archived topic
Adding an image to the nav bar
2 replies · Started by Dina Pearlman on June 3, 2015
Hello,
I am redoing a site for a client who wanted a responsive site (see http://http://www.shaktiyogawoodstock.com ) but keep the look the same. I am doing fine, except for the logo ON the nav bar.
Any ideas?
Dina Pearlman
wordimagemedia@gmail.com
This is a plugin that makes it easy to add icons or images as menu item:
I use it myself for icons. But there is also an option to add images....
Maybe you can use this
To add an image to the menu, you can use a function like this:
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 add this CSS:
.main-navigation .site-logo {
float: left;
line-height: 60px; /* Adjust this to your menu item height */
margin-right: 1.5em;
}
Adding PHP: http://generatepress.com/knowledgebase/adding-php-functions/
Adding CSS: http://generatepress.com/knowledgebase/adding-css/
Hope this helps :)
