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]
- Live Preview while customizing is not showing the updates while editing in WordPress
- Count top level menu items
- How to stop featured image thumbnail [set as background image] on blog index page just repeating same image across all posts
- WordPress child theme fails to override parent navigation menu in /inc/structure/header.php
- Slider loading issue
- create a select input with menus created on a custom options page
- Where to edit the template that is generating the code for dynamic_sidebar left-sidebar in the Understrap theme? [closed]
- Multiple WordPress Menus that will only display all pages
- Menu — How to add “current-menu-grand-ancestor” css class
- Input type search in Menu
- Plugin CSS not enqueing
- WP Walker using custom css classes
- how to remove metadata from the posts of my blog?
- Change list item content in menu navigation to add a child element with specific class
- Theme Options Page – User Updates Logo
- How to use my style.css file outside of wordpress subdomain?
- Dynamic Stylesheet loads but doesn’t finish
- How to add date to navigation bar
- Menu Limitations
- How can I Add a variable PHP in the Menu Nav
- Selectbox in admin panel function linking to CSS
- Where to place PHP code that inserts (or doesn’t insert) menu item?
- Can I install/embed WordPress on a ‘single page’?
- Using if/else statements with output from theme options
- Is there CSS to expand the gallery limit on Index Pages?
- Adding an Avatar to the Top Nav Bar
- Automatically adding new post categories to menu
- Add data attribute to each li in menu
- How to design a table based on css values set from admin/dashboard
- Remove metabox from WordPress menu editor page?
- Custom Walker_Nav_Menu issue with variables on PHP 7.3
- 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
- Incorrect MIME type for assets with Valet
- How to display pictures from database?
- How to add condition in wordpress loop? [closed]
- Unique icons next to each WordPress menu item
- Child page menu in sidebar
- Replace part of a parent-theme customizer in the child-theme
- Title Case WordPress Menu Items
- Customize position of social icons in upme plugin [closed]
- Delete mobile menu button [closed]
- Best way to schedule daily change in CSS parameter
- Css loads very slow [closed]
- Gravity form built in Captcha
- Secondary navigation menu on one page
- Remove class in nav_menu_link_attibutes filter
- How does wp_enqueue_scripts work?
- Different post styles depending on category
- How create a Shortcode with hover and complex options
- WordPress Multiple Navigation bars
- WordPress Quick Question . How to Get Parent Link in Submenu in My Code
- Trying to store submenu items to render out after main menu
- Detecting classes, adding widgets, and adding divs in with a Nav Walker
- How to change menu order item
- How to edit php files in Child Theme?
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Whats the proper way to use a php stylesheet in a wordpress theme? [duplicate]
- WordPress Child Themes
- custom css for admin only
- Custom Menus: dynamic highlighting problem with custom home link
- responsive.css in the WordPress should be prioritized
- How do I add a custom css to all posts without affecting homepage css? [closed]
- get_the_title() gets printed out twice
- Redirect to another page using contact form 7? [closed]
- Which is the correct way to conditionally enqueue a CSS file?