Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Nick Diego

    (@ndiego)

    Hi remery,

    I apologize for the delayed reply. Unfortunately this plugin cannot add an image to that spot. Out of curiosity, what theme are you using?

    Best,
    Nick

    Thread Starter private

    (@remery)

    Hey Nick, thanks for the reply. Yeah I had ruled this plugin out after some attempt. My latest attempt though is to just code a logo in CSS instead. Do you have some ideas on that?

    Theme is Expose Pro. Note the header image for this theme is the round image, but the .nav-primary is in (what is normally) the header location. I love the theme, but really want to put a traditional logo in the upper left corner.

    Any help is appreciated!
    Ron

    Plugin Author Nick Diego

    (@ndiego)

    Hi Ron,

    The easiest way would be to use the plugin I am currently building!!! All jest aside, I am building a plugin that would make this a snap, but it still has a month or so of development left.

    This plugin would actually do that for you, but it wouldn’t add the header on every page of your website, which I assume you would want. The easiest way to make this happen is use a hook. I would add the following code to the theme functions file:

    add_action( 'genesis_before_header', 'header_logo' );
    
    function header_logo() {
    	?>
    	<div class="header-logo"> An image or something </div>
    	<?php
    }

    Obviously you can add whatever HTML you want and style it as needed. This hook will add the content above the header on every page. If that hook doesn’t work (genesis_before_header), or you want to put it somewhere else, check out the visual hook guide .

    Anyway, I hope that help.

    Best,
    Nick

    Thread Starter private

    (@remery)

    Thanks Nick! I’ll try playing around with that. But for clarification – my placement would be in the nav-primary, right? Seems this theme is confusing in the header being below the nav bar. So is that still the right hook?

    Also, do I need to denote the dimensions of the image and/or do anything special to make it mobile friendly etc?

    Plugin Author Nick Diego

    (@ndiego)

    If you look in your functions file, you may be able to tell where they have hooked the nav menu. My guess is they used the same hook I did “genesis_before_header”. You can either use the “genesis_before” hook, or you can use the priority settings for hooks, so something like:

    add_action( 'genesis_before_header', 'header_logo', 1 );

    This should inject your header code before the nav menu. Once you get the HTML placed where you want it, you will definitely need to apply CSS to get it to look the way you want on Desktop and Mobile.

    Thread Starter private

    (@remery)

    Looks like here’s the hook to reposition the .nav-primary:

    //* Reposition the primary navigation menu
    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
    add_action( ‘genesis_before’, ‘genesis_do_nav’ );

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Logo Image in Primary Nav?’ is closed to new replies.