Tagged: menu, menu bug, menu error on mobile
-
AuthorPosts
-
January 29, 2023 at 9:38 pm #1395846
so, in the menu I have ‘gezichtsbehandelingen’ as parent, with several pages under it. However, on mobile I see gezichtsbehandelingen immediately under the parent.
gezichtsbehandelingen
>gezichtsbehandelingen
on desktop I don’t have this issues.January 29, 2023 at 9:50 pm #1395848Hey the_digital_manager,
That is because gezichtsbehandelingen is a link to a page and on mobile for the parent menu item to expand to show the child items you have to show it so it can be clicked, otherwise cliking the menu item will take you to the page instead of showing the child items.
See the theme settings at Enfold Theme Options ▸ Main Menu ▸ Burger/Mobile Menu ▸ Clone title menu items to submenu
and read the notice:
Since you selected to display submenu items on click or on hover, the parent menu item does no longer navigate to the URL it contains, but toggles the visibility of its submenu items. If you want users to be able to open the parent menu URL the theme can create a clone of that item in the submenuBest regards,
MikeFebruary 3, 2023 at 9:16 am #1396514Ah! that actually makes a lot of sense! thx for explaining. Howeer, would it be possible to change the name of the cloned parent? in this case the parent is ‘facial treatments’, as it is cloned under that parent, a name like ‘overview all facial treatments’ or something like that would make more sense / be less confusing to site visitors?
February 3, 2023 at 11:12 pm #1396609Hi,
To replace the burger menu parent cloned menu item text to a different text try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function replace_burger_menu_parent_cloned_menu_item_text() { ?> <script> window.addEventListener('DOMContentLoaded', function() { (function($){ $('.avia_mobile').on('click', '.av-burger-menu-main', function() { $('.menu-item-2339 .avia-menu-text:first').text(function(index, text) { return text.replace('Gezichtsbehandelingen', 'Overview All Facial Treatments'); }); }); }(jQuery)); }); </script> <?php } add_action('wp_footer', 'replace_burger_menu_parent_cloned_menu_item_text');
Please change the text: Overview All Facial Treatments to the text you wich to use.
Best regards,
Mike -
AuthorPosts
- The topic ‘Submenu shows parent as submenu page on mobile’ is closed to new replies.