[Resolved] Logo In Navbar

Home Forums Support [Resolved] Logo In Navbar

Home Forums Support Logo In Navbar

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #70613
    Matt Canning

    Is it possible to upload a logo in to the nav bar. Perhaps before the first page or even after the last page with an option to align?

    #70792
    Tom
    Lead Developer
    Lead Developer

    It would involve some custom PHP code in order to do that – I’m away from the office so I can’t provide it – but if you’d like it I can provide once I get home on Monday.

    You can also try setting the Navigation Position in “Customize > Layout” to float right.

    Then you can remove the navigation background from the navigation and set up your header element with the same color.

    That will achieve the same sort of look.

    Let me know πŸ™‚

    #70854
    Matt Canning

    I would be forever in your debt πŸ™‚ It would be fantastic if you could πŸ™‚

    I have also tried adding some custom CSS to try and get the space between the header and main content to 0 but I doesn’t seem to be working πŸ™

    #70962
    Dev

    I am interested in the same thing as well (ability to do logo in nav bar with align option and suppress rest of the header altogether). I am considering switching from a theme I purchased on themeforest because of your superior code quality and would gladly purchase every add on once I overcome some of these concerns.

    #71358
    Tom
    Lead Developer
    Lead Developer

    Ok, here’s how we do this πŸ™‚

    First, we’ll add our custom CSS:

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

    Now, let’s add our PHP – we can use this plugin to add the code: https://wordpress.org/plugins/code-snippets/

    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
    }

    A couple small adjustments may be needed – but that should be the bulk of it πŸ™‚

    #71407
    Matt Canning

    Good news. The code works.

    Bad news. I cannot get the nav bar to be 100% width and even though the colour code is the same it looks different :/

    #71412
    Matt Canning

    I’ve sorted it. Played around with the dimensions. Looks great!

    There is a gap between the header and main content which is slightly too big. Is there a way to reduce this?

    #71423
    Tom
    Lead Developer
    Lead Developer

    Do you have a link to your site so I can take a look?

    #72021
    Matt Canning
    #72239
    Tom
    Lead Developer
    Lead Developer

    Nice site!

    It looks like you already reduced the content top padding? You can reduce it more to make the gap smaller.

    Let me know πŸ™‚

    #82203
    Jessica

    De Snippet plugin does not save my code. Whatever I do, nothing works to save the second code, de php. Any tips for this?

    #82221
    Tom
    Lead Developer
    Lead Developer

    Have you tried contacting their support?

    Another option is to create a plugin with your PHP using this plugin (yes, a plugin to create a plugin): https://wordpress.org/plugins/pluginception/

    #88211
    Jessica

    The code does not work with the new generate press update. I get a white screen, it doenst show my website at all anymore.

    #88212
    Jessica

    Sorry my mistake, i did something wrong πŸ™‚ I works now

    #88234
    Tom
    Lead Developer
    Lead Developer

    Cool πŸ™‚

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