-
AuthorPosts
-
May 23, 2016 at 9:51 am #636643
Hi,
I have the mobile menu enabled on smartphones and tablets as I have quite an extensive navigation.
I would like the menu to only display the top level items on initial load and so I have checked the box so that a user needs to click on the parent menu for the sub-menus to be shown. However, in doing so, it’s actually not then possible to navigate to the parent menu.
Am I missing something? If I could set a separate mobile menu I would try and work around it by adding the parent menu into the sub-menu as well but I don’t want this also appearing on desktop.
Is there some way of being able to expand the navigation and still be able to click on the parent menu to reach those pages?
Cheers,
MarshaMay 24, 2016 at 8:17 am #637296Hey Marsha,
Thank you for using Enfold.
This is the default behaviour of the parent menu item when you hide the sub menu items. We can add a link beside the “parent menu item” but I’m not sure if you will like it. Add this in the functions.php file:
// add go to link add_action('wp_footer', 'ava_custom_script'); function ava_custom_script(){ ?> <script> (function($){ var $html = $('html'); $('#mobile-advanced .menu-item-has-children.menu-item-top-level > a').each(function() { $(this).append('<span class="mega-goto-link">Go to this page</a>'); }); $html.on('click', '.mega-goto-link', function() { var href = $('.mega-goto-link').parent('a').attr('href'); window.location.href = href; }); })(jQuery); </script> <?php }
And the following code in the Quick CSS field:
.mega-goto-link { font-size: 11px; position: absolute; right: 50px; cursor: pointer; } @media only screen and (min-width: 989px) { .mega-goto-link { display: none; } }
Best regards,
IsmaelJuly 18, 2016 at 3:29 am #661836Hi – I just tried this solution and nothing is different – no link is added. Link to site posted in private.
July 20, 2016 at 2:30 pm #662972Hi,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
Login credentials include:
- The URL to the login screen.
- A valid username (with full administration capabilities).
- As well as a password for that username.
- permission to deactivate plugins if necessary.
Best regards,
AndyJuly 22, 2016 at 3:48 am #663655Have supplied below
July 27, 2016 at 2:04 am #665551August 11, 2017 at 11:58 am #837395This reply has been marked as private.August 12, 2017 at 5:02 am #837713Hi,
@702arts: Please go to the Enfold > Main Menu > Burger/Mobile Menu panel then set the “Menu Icon Submenu items” settings to the first option. This will display every menu items including the sub items.Best regards,
IsmaelAugust 31, 2017 at 9:12 am #846141This reply has been marked as private.August 31, 2017 at 9:23 am #846144I have discovered that when I check the box (use mega menu) it displays the mega menu on the website but not on the mobile site. When I turn off mega menu or un-check (use mega menu) in appearance>menu then it displays on mobile but does not display mega menu on the website menu bar. I want to display mega menu on the browser and have all the menu items display on mobile. It’s funny how some of the menu sub menu items don’t display while others do.
Brad
August 31, 2017 at 10:25 am #846166Regarding mega menu’s and mobile it might be related to some of the recent changes. There’s a link with updated JS (while we wait for 4.1.3) in the thread https://kriesi.at/support/topic/sub-menu-do-not-appear-in-mobile-menu-since-4-1/
September 1, 2017 at 10:02 am #846755 -
AuthorPosts
- The topic ‘Mobile Menu – links’ is closed to new replies.