Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #388755

    Hello,

    I have a Menu with different Submenus (some 2 level deep). If in the Theme-Options I have the “Hide Mobile Menu Submenu Items” ticked, a “click/touch” on the Menu-Item does open the submenu and closes it again, when I “click/touch” it again. But if the Top-Menu-Item itself links to a page, i’m not able to navigate to that page.

    To illustrate the Problem:

    – Top -Menu-Item 1 —-
       Submenu-Item 1
       Submenu-Item 2

    All 3 Menu-Items link to a page. But within the Mobile Menu I’m only able to navigate to the submenu-items if in the Theme options the “Hide Mobile Menu Submenu Items” is ticked. There is no chance to navigate to the page the Top-Menu-Item 1 is linking to.

    The only solution right now is to not tick “Hide Mobile Menu Submenu Items”, but that makes the Mobile Menu very long, which is not very comfortable to navigate.

    Is there any other solution I can use?

    Link to the page: http://www.ggsaldenhoven.de

    • This topic was modified 9 years, 9 months ago by visualpro. Reason: formatting
    #389342

    Hi visualpro!

    Please go to Appearance > Menus and add a new link with your titles and use # for URL and place new menu item as your parent menu item, so it will not be clickable

    Best regards,
    Yigit

    #389345

    Thanks Yigit,

    but your solution will completely change my menu-structure, which I do not want.

    I think I will make submenu-items with a link to the top-menu-page and sort them as first sub-menu-item and then use media-queries to only make them visible in the mobile menu.

    It’s kind of a hack, but should work.

    The more I work with enfold, the more I see its shortcomings on many levels. Responsiveness ans the mobile menu being a big part of it.

    I have a custom stylesheet in my child-theme that is as long as the stylesheet that I have when developing my own theme. It is litered with !important tags and I’m constantly fighting against selector specifities. It’s really a pain.

    Mirko

    #390605

    Hey!

    If you need help with workaround you came up with, please let us know!

    Best regards,
    Yigit

    #575338

    Hello Moderator,
    I have the same problem with the submenu issue. On the mobile is the menu way to long. So I clicked the option “Hide submenu”. But now I cannot enter a page. What is your solution for this problem?
    Example:
    http://www.annemariebraun.nl/team/ is not clickable on my mobile. But I really want people to click on that link.

    #575369

    Hey!

    Iowah, please do try to work it around with the suggestion that Yigit made.

    Best regards,
    Basilis

    #575428

    Hello Basilis,
    That is exactly what I did. But there are some areas where I do not want to use that option.
    Is there a beter solution for this problem?

    #576865

    Hey!

    If the parent menu item contains sub menu items, on first tap it will open the dropdown menu and only on the second tap that you will be able to go to the actual page. Is this not the case on your site’s mobile menu?

    Cheers!
    Ismael

    #577409

    Hello Ismael,

    That is not the case with my site. If I tap again on my mobile, it shows that item and shows the main menu again.

    Kind regards,

    Iowah Munters

    #579385

    Hey!

    I checked the mobile menu and I can browse through every page or menu items including those inside the mega menu. Which of these menu items you don’t have access to?

    Cheers!
    Ismael

    #579560

    Hello Ismael,

    Most of the menu I organized it now in a mega menu, but there is still one page where I don’t haven another solution for.
    If you navigate to:
    –> Mind
    –> Therapie / Coaching
    –> Therapie & Coaching vormen (this page is an actual page) this page is only clickable on the computer.

    Kind regards,

    Iowah Munters

    #581444

    Hi!

    We can create a script to redirect you to the actual page when you click on the item or you can add another menu item under the “Therapie & Coaching vormen” that will take you to the page. Basically, you will have a sub menu item that will take you to the parent page “Therapie & Coaching vormen”.

    Cheers!
    Ismael

    #582194

    Hello Ismael,

    If you could create that script, that would be wonderful.

    Love to hear from you.

    Kind regards,

    Iowah Munters

    #582906

    Hi!

    You can try the following code in the functions.php file.

    // add go to link for mega menu items
    add_action('wp_footer', 'ava_custom_script');
    function ava_custom_script(){
    ?>
    <script>
    (function($){
    	var $html = $('html');
    	
    	$('.avia_mega_div .menu-item-has-children > 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
    }

    This code will go to 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;
      }
    }

    The code above will append a “Go to this page” link which will redirect you to the parent page when clicked or tapped.

    Regards,
    Ismael

    #645212

    Hi – I tried this fix by adding the above code to my child theme css and child theme functions.php but nothing has changed on the site.

    #646057

    Hi,

    We checked the site but I don’t see the script added in the page. Please create a new thread with the url to the site and the login details. We’ll check it there.

    Best regards,
    Ismael

    #646153

    Sorry I had since removed that code as it wasn’t working and I found a different fix for the menu which is working for me except one issue with the mega menu one – see this thread:

    Thanks.

    #647768

    Hi,

    Alright. We’ll continue on the other thread.

    Best regards,
    Ismael

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Mobile Menu with Submenu Items’ is closed to new replies.