[Support request] Logo on secondary navigation.

Home Forums Support [Support request] Logo on secondary navigation.

Home Forums Support Logo on secondary navigation.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #471254
    Ezekiel

    Hi
    Please, how can I show logo on secondary navigation on other pages and not on the homepage?

    Thank you for your help.

    Ezekiel.

    #471469
    Leo
    Staff
    Customer Support
    #482375
    Ezekiel

    Hi Leo,

    Thank you for the response it really helped, but I am a bit confused as to how to exclude the home page. this is what I did but it crashed my website;

    <?php if ( ! is_front_page() ) : ?>
      add_action( 'generate_inside_secondary_navigation','add_secondary_navigation_logo' );  
    function add_secondary_navigation_logo() { ?> 
        <div class="secondary-navigation-logo">
            <img src="http://projectsamng.com/wp-content/uploads/2018/01/Secondary-Menue-Logo.png" alt="" />
        </div>
    <?php }
    <?php endif; ?>

    I don’t know PHP but I am trying my best.

    Ezekiel.

    #482754
    Leo
    Staff
    Customer Support

    Try this instead:

    add_action( 'generate_inside_secondary_navigation','add_secondary_navigation_logo' );  
    function add_secondary_navigation_logo() { ?>
        <?php if ( ! is_front_page() ) : ?>
            <div class="secondary-navigation-logo">
                <img src="http://projectsamng.com/wp-content/uploads/2018/01/Secondary-Menue-Logo.png" alt="" />
            </div>
        <?php endif; ?>
    <?php }
    #482787
    Ezekiel

    Hi Leo,

    Thank you for the response, I tried it but I keep getting this message;

    Don’t Panic
    The code snippet you are trying to save produced a fatal error on line 7:

    syntax error, unexpected ‘endif’ (T_ENDIF)
    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.

    Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.

    #482990
    Leo
    Staff
    Customer Support

    Sorry made a mistake.

    It should work now 🙂

    #485213
    Ezekiel

    Hi Leo,

    Thank you so much. Is it possible to keep the secondary bar on the home page and hide only the logo.

    Ezekiel R.

    #485566
    Leo
    Staff
    Customer Support

    Not sure what you mean? The code I provided should’ve added the logo only everywhere except home page.

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