• Resolved MooK

    (@kubelyan)


    Hi.

    I was following the directions which you gave HERE , lookg very nice, but logo doesn’t link to the homepage, and just showing additional /#logo in URL
    How I can make it to navigate to homepage?

    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello there,

    Thank you for reaching out to us here.

    Please visit the custom menu editor (Appearance > Menus). Edit the menu item where you define #logo. Replace it with your site URL.

    Then navigate to Settings > Header and Footer Scripts panel. Find this line of code in the “Scripts in footer:” box.

    
    var middleMenu = $('a[href="#logo"]');
    

    Replace the #logo with your site URL. So it’ll look like this:

    
    var middleMenu = $('a[href="https://yoursite.com"]');
    

    Let me know how it goes.

    Regards,
    Kharis

    Thread Starter MooK

    (@kubelyan)

    Never mind. I got it.

    thanks

    Thread Starter MooK

    (@kubelyan)

    oh. thanks a lot!! I saw it in forum. didn’t realized that you will respond so fast.

    thanks a LOT!

    Thread Starter MooK

    (@kubelyan)

    this is the code I added:

    <script type=”text/javascript”>
    jQuery(function($) {

    var middleMenu = $(‘a[href=”#logo”]’);
    var logo = $(‘.site-header .col-md-4 > a’).html();

    if ( matchMedia( ‘only screen and (min-width: 1025px)’ ).matches ) {
    if(middleMenu.length){

    middleMenu.parent(‘li’).addClass(‘site-logo-middle-menu’);
    $(‘.site-header .col-md-4 > a’).remove();
    middleMenu.html(logo);

    }

    }

    if ( matchMedia( ‘only screen and (max-width: 1024px)’ ).matches ) {

    middleMenu.parent(‘li’).remove();

    }

    });

    jQuery(function($) {
    $(window).on(‘load’, function() {

    var siteLogoLink = $(‘a[href=”#logo”]’);

    if( siteLogoLink.length ){
    siteLogoLink.attr(‘href’, ‘https://mysite.com/&#8217;);
    }

    });
    });
    </script>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Logo in the Middle of the Menu doesn’t link to Home Page’ is closed to new replies.