a bit hacky, but it works:
add_filter('nav_menu_css_class', 'remove_some_menu_classes', 420 ,3);
function remove_some_menu_classes($classes, $item, $args){
if(strpos($item->url, '#order') !== false)
// in the 2nd array put the classes you want removed
return array_diff($classes, array('current_page_item', 'current-menu-item'));
return $classes;
}
Related Posts:
- Custom CSS Nav Menu Style Not Being Applied
- Custom CSS File wont work on second Page
- Where are Additional CSS files stored
- Remove wrapping div and ul from output of wp_nav_menu
- How to include own css on wordpress tinymce editor?
- Create a url structure for my blogs based on categories and sub-cats
- Looking replicate static HTML Menu into WordPress Dynamic Menu [closed]
- CSS Styling a specific page
- How to remove footer from just homepage
- Why the css in twenteenfourteen-child theme take no effect?
- Custom font size nav bar
- How to format text of site subtitle
- Sticky menu for WP custom menubars
- how to add custom logo to my template
- WordPress noob, assign custom stylesheet using @import or if? Didn’t work for me
- str_replace inside specific css files [closed]
- Stop Expansion of Top Level Menu in the WordPress Admin Sidebar
- Insert menu with a custom walker into page / post body using shortcode?
- Implement a Walker with custom object rather than WordPress database object
- Good way to customize admin CSS?
- css media query question [closed]
- How to customize the WordPress 2014 theme, to have page using less horizontal margin?
- How can I tag a menu item as visited for each unique user?
- How do I create a root link in wordpress to a PDF file?
- Position a hard-coded menu item
- How can i create menu like in the example?
- WordPress custom dropdown listings
- Remove header title form page through CSS [closed]
- How to request container_class from wp_nav_menu
- Centering one product on a single page [closed]
- Menu not appearing in custom theme
- How can i display custom menu in sidebar?
- How to have multiple WordPress Menus
- How to add active state to the navigation links?
- How To Style Links in Content Area With Tag Automatically?
- Inline-Table under TwentyTwelve not working
- custom css and javascript not working on page defined as template?
- Missing current_page_item in custom menu
- Customize Widget Navigation
- Custom menu not showing even though it shows as being registered?
- How to add Custom Css within the Editor?
- Will WordPress updates remove Gutenberg Additional Classes?
- custom email validation using javascript api with elementor pro and code snippets
- Style WooCommerce Product Search Widget
- why won’t my custom css load with the enqueue method or any other method?
- Current menu item highlights wrong
- Use Theme CSS in custom code
- Add producthunt badge to wordpress menu
- Woocommerce custom “My Account” Tab – Add Save button
- How can I style the Comment Section of a blog post
- Hide entry-header for a specific category
- How do I make elements in mobile only reverse order?
- How to style bootstrap container in WordPress?
- Adding a drop-down (select tag) option under Menu Settings in WordPress Admin
- how to add custom html and css to wordpress
- How to add a template – so that i can choose a different menu for some pages
- How can I delete the word `Category:` from page titles? [duplicate]
- How to have different background image based on post category
- How replace theme styles?
- clickable toggle menu, help
- Wrap WordPress Login Form in custom Div
- How to create custom post type selection to nav menu
- Customize WP website specific column with CSS
- How do I target this page specifically?
- Help needed creating a custom Hamburger menu in header
- Menu selection for header
- How do I change the content of an element for a theme without losing the styling?
- How to create a custom menu for specific user
- I can’t override CSS
- How to customize WordPress vertical menu?
- Creating a dynamic URL for an external link inside content
- remove or hide Link Relationship (XFN) form Menus tab
- Two color in one Heading
- My connecting URL form in html to PHP does not work
- User WordPress menu in custom page
- Adding images to anchors in the list created and fetched with wp_nav_menu
- Move text from the side of image to below image [closed]
- WordPress Inline Style missing
- Style Radio Buttons inside Edit Page (Custom Fields)
- how to hard link to the posts page?
- Adding separate CSS files for separate pages with functions.php
- How to echo custom styles in css format?
- How do I display entries in the top menu based on conditions selected in the sidebar menu?
- Background setting isn’t applied to entire sidebar height
- Buddypress: New Tab and Page (Members Profile) [closed]
- How to work around the bug which prevents custom menus from being deleted?
- Class .current-menu-item in custom menu Walker
- Special characters showing in fallback font
- How to support extra color options for shortcodes?
- Adding css and js to a blank page created with custom template
- menu customization
- Will too many overridden css rules lead to performance issues
- How to move menu next to left of the search box?
- Complete Custom Style Part of Site
- add custom css on all page exept of one
- Making custom pages (with an example to explain the goal)
- how can i change the html and the css of my word press theme that I bought?
- responsive screen not working [closed]
- Edit image alignment in WordPress twentysixteen child theme on attachment page [closed]
- removing extra mobile menu from the header