Rather than adding a class, just add a second selector to your .current_menu_item
style of .home .menu-item-225
. Not ideal, but for a single case, I think it’s completely appropriate.
(This assumes that you’re using body_class()
on your <body>
element, but you should be doing that anyway.)
Related Posts:
- wp_nav_menu not working correctly in my underscores theme
- Bring Font Awesome icons inside menu A tags
- wp nav menu: add attributes to menu items [duplicate]
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- How to make custom total price reactive in navigation
- Adding tawk.to code just before body tag on functions.php file
- How do I fetch all comments per post via WP REST API?
- Have CSS Class Added with `is_page()` WP function
- Deregistering a script in WordPress seems impossible
- Slide in Panel WordPress Post
- Sending jsPDF documents to the server
- How to prevent those PHP variables from being cached on WordPress?
- Ajax return code 400
- How can I add an alert (like the old javascript alerts) to my WP page?
- Pass PHP variable to JavaScript without inline JS
- Show post in slider
- How can I output a php value into a JS file within WordPress?
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Using shipped version of jquery
- Run a filter when a walker runs
- Putting PHP variables into javascript [duplicate]
- How to display conditional-content if wp_nav_menu( $args ) retruns something
- Bridging TinyMCE js and WordPress PHP?
- Trying to implement Ajax comments in WordPress, getting WP error
- How to test nonce with AJAX – Plugin development
- Can’t extend some core classes
- How do I display a user’s previous orders as a select box option on a product?
- Simple Plugin with custom javascript wont work – no console error
- Change Navigation Bar based on logged in or not
- How does this WordPress Plugin (Thrive Comments) apply their custom comment sort? [closed]
- How can I use a modal window to display the current post in loops featured image?
- js file in root loading without
- Show comments menu in dashboard only if the site has comment
- Trouble creating conditional PHP for nav menu items with children for custom Walker
- class click counter save number
- Trigger popup in a php if/else statement
- Count top level menu items
- Slider loading issue
- create a select input with menus created on a custom options page
- AJAX request status 200 but no actual “response”
- Button not refreshing page
- Multiple WordPress Menus that will only display all pages
- Ajax not working es expected (Returns 0)
- Menu — How to add “current-menu-grand-ancestor” css class
- Input type search in Menu
- Use menu link or onClick to set a variable
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- WP Walker using custom css classes
- How to select the contents in the text view textrea in wp_editor?
- Creating a Multi-Level Associative Object Using AJAX
- WP functions in .js
- Adding custom directory and PHP files in wordpress
- Change list item content in menu navigation to add a child element with specific class
- Ajax – Call to undefined function get_option()
- Menu Limitations
- How can I Add a variable PHP in the Menu Nav
- Where to place PHP code that inserts (or doesn’t insert) menu item?
- Populate dropdown with Child Pages based on Parent Page chosen
- remove wp floating submenu in wp dashboard
- Adding an Avatar to the Top Nav Bar
- Displaying admin notices inside the block editor from rest_after_insert_{$this->post_type} hook
- search and replace preword from author
- How to prevent XSS alter custom global javascript object & methods in WordPress
- Automatically adding new post categories to menu
- Add data attribute to each li in menu
- How to complete two other input fields, completed the first
- How to get the element ID from new menu list that added with add_filter()?
- Status 400 for AJAX POST Request with admin-ajax.php
- How to inject variables into public-facing JS using wp_enqueue_script
- How to pass aa JS variable to PHP?
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- Ajax random number always the same
- Image upload via FormData API and AJAX is not working ($_FILES always empty)
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- JS file work only in index page
- Need Help Fixing My Iframes [closed]
- wp_enqueue_scripts leads to error
- Javascript file is not working on single.php wordpress [closed]
- Remove metabox from WordPress menu editor page?
- How to change redirection route to a php page for making it only accessible by logged-in members?
- Custom Walker_Nav_Menu issue with variables on PHP 7.3
- Integrating PHP into Javascript to display map markers with Google API – problem with wp_localize
- How to add an arrow to menu items has submenus
- Save Search System
- wp_nav_menu returns menu list in ascending order. How can I arrange the menu same as dashboard menu
- dynamic dependent select dropdown
- Passing UTM Parameters To Modify Page In WordPress
- How to send Ajax request from my plugin in admin dashboard?
- Incorrect MIME type for assets with Valet
- Customizer: Multiple CSS styles on same element in Live Preview
- wordpress visual composer change grid builder post link
- Ajax load more button for comments wordpress
- How to register javascript variables in wp_localize_script?
- Open post-content in archive page in a Modal box with bootstrap
- Creating own shortcode – echoeing php variable based on JS variable
- Unique icons next to each WordPress menu item
- How to add a do_action on refreshing of WP customizer?
- Child page menu in sidebar
- Title Case WordPress Menu Items
- How to pre populate a form field with a link of a current user’s author profile?