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
- WordPress Infinite Scroll without using any plugin
- Create Image Uploader for Widget
- WordPress Ajax always returns a 404 error
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- How to remove a metabox from menu editor page?
- Ajax template: how to handle head section
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- How to resize image on client-side before upload?
- Limit the Excerpt field in WP-Admin in words
- How to add active class to custom menu using while loop and wp_list_pages
- Run shortcode at certain resolution
- Audio Player not loading when the content is loaded through Ajax, MediaElement.js no applied
- Customizer Show/Hide Logo and Site Title
- Use different javascript files for each page on website
- Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error
- Create custom blocks for bootstrap
- Click loads template via ajax
- Sending jsPDF documents to the server
- Change Navigation Bar based on logged in or not
- js file in root loading without
- Use menu link or onClick to set a variable
- Displaying admin notices inside the block editor from rest_after_insert_{$this->post_type} hook
- 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
- wordpress visual composer change grid builder post link
- PHP array to JS array to use in google map
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Fancybox type popup window that’s not an iframe
- how to make my website secured
- How to correctly add Javascript to this PHP ‘Page Not Found’ Page?
- get taxonomy thumbnail and use it as a variable in code
- What are the advantages/disadvantages of using jQuery DOM manipulation as opposed to PHP DOM manipulation?
- element not working in Safari [closed]
- Is it save to use eval for a jQuery callback method coming from the database?
- New walker for walker_nav_menu to change inside container data
- Add data-id attribute to child page links
- Get html data with javascript to php array and store to wordpress database
- An audio player that showcase a random song from playlist every 24h [closed]
- How to Change CSS Colors from Custom Plugin Settings Page
- Passing the name of selected color from the custom component to `render_callback`
- How to allow download url redirection only if user logged in WordPress site?
- wp_localize_script() and JavaScript namespaces
- Notice: Trying to get property of non-object
- How can I get my Media Uploader Button to function on 1 click rather than requiring 2 clicks?
- Link to page with posts of specific type
- Nav-Menu not showing up
- Hard-coding a shortcode as the last menu item in primary navigation?
- WordPress – Get Posts with Category data
- How to use wp_send_json() and output the value with ajax?
- Nav Walker that shows only children and siblings of top level parent menu item
- how to changes mobile menu toggle breakpoint in WordPress
- How to display already created menus via php?
- How to store checkbox data for individual users?
- using shortcodes inside gravity forms
- Gutenberg block don’t save rich text content
- Creating a POP Alert
- Create a WordPress Contact Form to call a POST AWS API Gateway and send user data
- Admin-ajax.php 404 error
- Hide Approved status for certain users in users list
- ACF values to Script with auto refresh
- How to let mobile navigation menu close when link is clicked?
- Add element after navigation element title don’t works like I expect
- wordpress dependent dropdownlist using post type is not working
- How to echo a PHP code into WooCommerce variation product?
- Custom Post type Ajax search results
- include javascript Multiple files in wordpress through script.js
- Ajax wordpress function showing source code in alert and not value of input field?
- How to create a sub-page of sub-page?
- Full search and replace isn’t enough to make all pictures to be loaded with https
- I want url from a file in media using title file
- make an array in wordpress cusmization api?
- ACF + WP + Slick Slider Repeater Slide Group PHP not Displaying [closed]
- Find the method which AJAX GET calls
- Widget Logic – display on page and all child
- Default Image not showing up in Customizer for WP_Customize_Cropped_Image_Control
- How to create a radio button to alt between settings in wp_options table
- Retrieve $_POST data to send to javascript without using localize script
- Adding button to wordpress menu
- I need help implement a Javascript code into the PHP file
- Add a downloaded JS file to WordPress
- How to call javascript function (jquery) in a shortcode?
- Querying latitude and longitude into google maps correctly
- How to get the count for each taxonomy term
- WP_Nav Highlight Parent Issue
- 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?
- Load php function with AJAX on modal window
- Make a permalink to the most recent blog post
- JSON Object Value Show Undefine
- notify users when changed database
- Import js variables loaded via wp_localize_script() into js module without global scope connection
- Remove Woocommerce product from cart with ajax/fetch
- WooCommerce Modal Fly cart on add to cart – With AJAX
- Custom nav with bootstrap dropdown
- hiddenQuestions.find is not a function
- get_post_meta returns on side but it doesn’t return on bottom of admin page