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?
- Add custom html to last sub-menu item
- Show a WP 3.0 Custom Menu in an HTML Select with Auto-Navigation?
- global menus made from master site’s custom menus wpmu network
- wordpress custom walker for thumbnails with custom menu
- Change default status and replace the icon for an hamburger menu
- simple expandable vertical menu, java script problem
- wp_nav_menu google analytics event tracking
- Only append custom classes to nav menu items
- Hide Login information in Account settings in Buddy Boss
- How to remove padding and margin between divi rows? [closed]
- What will happen to the additional CSS when the theme is updated?
- How to display post title & excerpt when mouse hovers on an image?
- Include user defined styles without including wp-load
- remove everything from wp_nav_menu
- Cannot figure out how to center div in WordPress theme [closed]
- Customizing default Mediaelement player
- add JS to multiple plugin admin pages
- Putting tag outside tag on generated Menu
- how to add custom css and js on wordpress post editor directly without using .php file
- Programmatically (PHP) get the nr. of items in the primary navigation menu
- Adding code to child’s theme css and php cannot override certain elements
- How to create left and right menu with logo center in a custom theme?
- How Do I Remove The Right Hand Block On The Main Header?
- Resizing of a header/div in a website through css in wordpress [closed]
- Adding posts to custom menu [closed]
- Alphabetical Custom Menu
- WPML Plugin Not displaying multilingual Menus
- Looking replicate static HTML Menu into WordPress Dynamic Menu [closed]
- CSS Styling a specific page
- How to remove footer from just homepage
- Custom font size nav bar
- How to format text of site subtitle
- str_replace inside specific css files [closed]
- Insert menu with a custom walker into page / post body using shortcode?
- Good way to customize admin CSS?
- How to customize the WordPress 2014 theme, to have page using less horizontal margin?
- Position a hard-coded menu item
- How can i create menu like in the example?
- How to request container_class from wp_nav_menu
- Menu not appearing in custom theme
- How can i display custom menu in sidebar?
- How To Style Links in Content Area With Tag Automatically?
- Inline-Table under TwentyTwelve not working
- Custom menu not showing even though it shows as being registered?
- custom email validation using javascript api with elementor pro and code snippets
- Style WooCommerce Product Search Widget
- Current menu item highlights wrong
- Use Theme CSS in custom code
- Woocommerce custom “My Account” Tab – Add Save button
- Hide entry-header for a specific category
- How to style bootstrap container in WordPress?
- 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 replace theme styles?
- Wrap WordPress Login Form in custom Div
- How to create custom post type selection to nav menu
- Customize WP website specific column with CSS
- Help needed creating a custom Hamburger menu in 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
- 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]
- Adding separate CSS files for separate pages with functions.php
- 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
- 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
- how can i change the html and the css of my word press theme that I bought?
- responsive screen not working [closed]
- removing extra mobile menu from the header
- use another theme for just one page
- Instead of Custom CSS Theme CSS is loading
- Particle.js not loading in WordPress Gutenberg
- Cannot add custom css in site
- Custom CSS working on home page but not on NEW created PAGE
- Post interior margin in twenty eleven theme
- Disable all Fonts that are Standard in WordPress and replacing them with a custom Font?
- Custom Menu (only showing direct cildren) ACF not showing
- Modifying posts based on category in TwentyTwentyTwo theme
- Add custom styles to the Raft theme
- Where did I put this one line of css?