[Resolved] Adding an image to the nav bar

Home Forums Support [Resolved] Adding an image to the nav bar

Home Forums Support Adding an image to the nav bar

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #112245
    Dina Pearlman

    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

    #112249
    Are Martin

    This is a plugin that makes it easy to add icons or images as menu item:

    Menu Icons

    I use it myself for icons. But there is also an option to add images….

    Maybe you can use this

    #112257
    Tom
    Lead Developer
    Lead Developer

    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 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.