I would use javascript (or jQuery) to detect when the menu item is clicked and close the menu.
$( '.menu-item' ).on( 'click', function(e){
e.preventdefault();
// add a class to target with CSS and close the menu or do animation to close it
} );
Related Posts:
- Adding first / last CSS classes to menus
- Understanding child theme functions.php
- Want to create Child theme, but already edited Parent theme css files and some php files
- wp nav menu: add attributes to menu items [duplicate]
- Can’t extend some core classes
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- Parent theme CSS overriding child CSS rules
- How to style options page in dashboard?
- two columns of posts on homepage, one of them “favorites”
- Custom Background by Page IDs
- Menu Custom Data Attributes
- How to modify mobile nav menu text in theme
- Extend Menu Walker Output
- conditional: if is page, and all subpages
- wp nav menu: show submenu below li item
- Styling an “active” link outside of WordPress default menu
- How to edit background color of only one sidebar?
- Inline CSS header style priority function.php Child (no enqueing I think)
- how to changes mobile menu toggle breakpoint in WordPress
- Why would the child theme load in the Customize preview, but not on the site itself?
- How to make only the valid active page of a multilevel menu active with – “.nav li.current-menu-item a”?
- dynamic php menu with hidden sub-categories only showing when the category name is clicked
- How to locate parent theme functions and add functions to my wordpress child theme?
- how to add functions to my function.php using a child theme?
- Bring Font Awesome icons inside menu A tags
- Display specific main Sub Nav on Woocommerce product pages
- How limit the width of a fixed menu-bar on scroll?
- Where to find the html for WordPress site? [closed]
- How to remove image on single product and get product to span page?
- Modify arguments for parent theme’s `wp_register_style` via child theme
- Child theme not working properly
- WP_Nav Highlight Parent Issue
- How to change the menu color
- Child-theme suddenly stopped working [closed]
- Childs PHP files not overwriting Parent’s PHP files
- Is it possible to disable a function of a parent theme?
- How to remove a metabox from menu editor page?
- How to change “Shipping Calculator “field label on Cart Page – woocommerce? [closed]
- How to create different menu’s for not logged in visitors and for logged in members?
- How to add active class to custom menu using while loop and wp_list_pages
- Add footer.php to WordPress child theme
- Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error
- Put CSS inside a PHP file and include it the right way
- Missing sidebar parameter “fix” – before_content
- WordPress child theme fails to override parent navigation menu in /inc/structure/header.php
- How to use my style.css file outside of wordpress subdomain?
- Can I install/embed WordPress on a ‘single page’?
- Add data attribute to each li in menu
- Remove metabox from WordPress menu editor page?
- How to add an arrow to menu items has submenus
- wp_nav_menu returns menu list in ascending order. How can I arrange the menu same as dashboard menu
- Best way to schedule daily change in CSS parameter
- WordPress Child Themes
- proper way to add css using functions.php?
- RTL Stylesheet Confusion with WordPress
- How to make container class in PHP
- New walker for walker_nav_menu to change inside container data
- Add data-id attribute to child page links
- PHP in CSS file?
- Last class on last headline?
- How to remove sidebar primary widget on Mobile on category page [closed]
- How to Change CSS Colors from Custom Plugin Settings Page
- Warning: printf(): Too few arguments in helpers.php file
- How do I check or test a WordPress Auto Year Change Script?
- Can I set up a hover animation in CSS depending on a PHP conditional?
- wp_nav_menu not working correctly in my underscores theme
- Notice: Trying to get property of non-object
- Nav-Menu not showing up
- Need advice on theme customizer and child themes
- CSS images don’t show up with bloginfo
- Hard-coding a shortcode as the last menu item in primary navigation?
- Nav Walker that shows only children and siblings of top level parent menu item
- How to display already created menus via php?
- remove_action from parent theme using child theme functions.php
- oceanwp+woo mobile cart sidebar text
- How to hide a div section when user is logged in, in single product woocommerce
- How to change this ajax function to submit to the default wordpress content area instead of the custom field ‘seller notes’?
- Drop down question
- Can’t display anything through homepage text editor
- How to Change Site Elements based on referring URL
- Site title not showing. Please help me
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- Hot to edit WooCOmmerce dashboard?
- How to override html codes in wordpress?
- Target a specific container to style on WordPress storefront theme
- Adding custom PHP to existing loop in Genesis
- How to list categories by page id in wordpress
- Custom Theme, Editor won’t wrap text (i.e. change width)
- Click to expand menu
- wp_nav_menu doesn’t work in a duplicate server
- How I can add div to menu?
- Using ‘array’ method in wp_nav_menu causes it to disappear
- WordPress – Image href for home menu nav not working
- if is_home(), change class of menu-item-225 of wp_nav_menu
- Change order that the menu is generated with wp_list_pages
- I am extending Walker_Nav_Menu: How can I get the number of children elements of the current item?
- If I define a variable in header.php, how do I make it available to templates?
- New to wordpress. Need Help with templates [closed]
- Parse error: syntax error, unexpected ‘}’ in
- How to create different templates for woocommerce single-product.php?