Primary Menu Dropdown Arrow

  • Author
    Posts
  • #102462

    Hi, Not sure if this is a bug, or setting I need to change? Currently, if you click on the main menu it takes you to its own (blank) page. If you click on the arrow, it shows the submenus. I don’t want the primary menu activated (clickable) to its own page. I just want to reveal the submenu either with use of the arrow or both, the primary menu and arrow.Thanks so much, Paul

    Website: paulqaysi.com

    #103435
    Zed
    Cryout Creations mastermind

    I see you’ve resolved this in the meantime.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #112327

    Hello, I’m in the same situation as @paulq and want to know what changes did he make for the menu to be able to click on text for submenu dropdown.

    Thanks, Vlad

    Website: incotrocalatorim.ro

    #114141
    Zed
    Cryout Creations mastermind

    Hi Vlad,

    I really like how your site looks!

    Normally, the theme uses the down arrow to toggle the submenus’ visibility, since the menu items are usually links and need to work to navigate to their target sections of the site.

    If you’re using the parent menu items as just placeholders for the dropdowns, you can force toggle the dropdowns when clicking/tapping the menu items with the use of a short custom script:

    jQuery(document).ready( function() {  
    	jQuery('#access .menu-item > a, #mobile-menu .menu-item > a').on('click', function(e) {
    		if ( ( typeof jQuery(this).attr('href') != 'undefined' ) && ( jQuery(this).attr('href') != '#') ) return;
    		e.preventDefault();
    		jQuery(this).next('.dropdown-toggle').trigger('click');
    		return false;
    	})
    });

    You can apply this on the site using one of the many script insertion plugins, for example https://wordpress.org/plugins/header-and-footer-scripts/.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Primary Menu Dropdown Arrow’ is closed to new replies.