-
AuthorPosts
-
November 20, 2021 at 12:17 pm #1329774November 20, 2021 at 1:14 pm #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,
MikeNovember 20, 2021 at 1:16 pm #1329776I donr use any plugin (language selector)
November 20, 2021 at 2:12 pm #1329780Hi,
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,
MikeNovember 20, 2021 at 2:15 pm #1329781This is image from Photoshop.
November 20, 2021 at 3:12 pm #1329785Hi,
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; } }
Best regards,
MikeNovember 21, 2021 at 11:33 am #1329837I 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.
November 21, 2021 at 1:19 pm #1329838Hi,
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,
MikeNovember 21, 2021 at 2:10 pm #1329842Thank you Mike, but it also appears in the menu?
November 21, 2021 at 3:34 pm #1329843Hi,
Please add the items so I can examine and give you some css to hide from the mobile menu.Best regards,
MikeNovember 21, 2021 at 3:48 pm #1329845Hi Mike,
I added to web site…
November 21, 2021 at 8:56 pm #1329852Hi,
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,
MikeNovember 21, 2021 at 10:05 pm #1329858Hello 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,
November 21, 2021 at 10:59 pm #1329863Hi,
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 -
AuthorPosts
- The topic ‘How can I add a link next to the burger menu’ is closed to new replies.