Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1329774

    Hello,
    How can I add a link next to the burger menu like below.

    Screen-Shot-2021-11-20-at-13-18-02

    Best.

    #1329775

    Hey koraytastan,
    If the link is a language selector can you tell us which plugin you are using and link to your site so we can see where it is currently showing?

    Best regards,
    Mike

    #1329776

    I donr use any plugin (language selector)

    #1329780

    Hi,
    Ok, your screenshot looks like a language selector, are these two links or one? are the links shown on the desktop site? Can we see your site?

    Best regards,
    Mike

    #1329781

    This is image from Photoshop.

    #1329785

    Hi,
    Ok, assuming that this will be a link that only shows on mobile, you can add a custom menu item to the bottom of your main menu and adjust this css so the menu ID in the rule matches your menu item:

    @media only screen and (max-width: 767px) { 
    	.responsive #top .av-main-nav #menu-item-3178.menu-item {
    	display:block;
    }
    }
    @media only screen and (min-width: 768px) { 
    	.responsive #top .av-main-nav #menu-item-3178.menu-item {
    	display:none;
    }
    }
    

    2021-11-20_001.jpg

    Best regards,
    Mike

    #1329837

    I want to add two links to the left side of the burger menu (TR | EN). Both mobile and desktop.I believe it can be solved with one line of code.

    #1329838

    Hi,
    Please create two menu items like above and adjust this css to match your menu item ID’s

    .responsive #top .av-main-nav #menu-item-3178.menu-item {
    	display:block;
    }
    .responsive #top .av-main-nav #menu-item-3179.menu-item {
    	display:block;
    }

    Best regards,
    Mike

    #1329842

    Thank you Mike, but it also appears in the menu?

    #1329843

    Hi,
    Please add the items so I can examine and give you some css to hide from the mobile menu.

    Best regards,
    Mike

    #1329845

    Hi Mike,

    I added to web site…

    #1329852

    Hi,
    Thank you, I see that you tried to add this css to hide the added menu items:

    .responsive #top #wrap_all #header #av-burger-menu-ul > li.menu-item-1134.av-active-burger-items {
        display: none;
    }

    and they are hidden after a second but on initial opening of the burger menu they are shown, this is because the burger flyout menu is created on click and is not present on page load so there is a lag between the menu creation and the browser applying the css.
    So let’s scrap that idea and try this instead, remove those menu items, and add this code to the end of your functions.php file in Appearance ▸ Editor:

    function custom_menulink_script() { ?>
        <script>
    (function($) {
      var custommenulink = $('<a class="custommenulink" href="/tr/">TR</a><a class="custommenulink" href="/en/">EN</a>');
        $(custommenulink).insertBefore('.menu-item-avia-special');
    })(jQuery);
    </script>
        <?php
    }
    add_action('wp_footer', 'custom_menulink_script');

    please adjust the link url in the above code.
    and add this code in the General Styling ▸ Quick CSS field:

    a.custommenulink {
        line-height: 80px;
        color: #fff;
        padding: 0 13px;
        font-weight: 600;
    }
    a.custommenulink:hover {
        color: #fff;
        text-decoration: none;
    }
    .js_active.html_burger_menu #avia-menu .av-burger-menu-main {
    	float: right;
    }
    @media only screen and (min-width: 768px) { 
    #avia-menu a.custommenulink {
        line-height: 90px;
    	}
    }

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1329858

    Hello Mike,

    Thank you for supports. it works flawlessly. I think this codes will be a guide for adding foreign language options or other menus.

    Best regards,

    #1329863

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘How can I add a link next to the burger menu’ is closed to new replies.