If you’re using WordPress custom menus ( and you should when you’re dealing with menus ), it adds class current-menu-item
for page that is currently being viewed.
Related Posts:
- How to add (css) classes to only one wp_nav_menu()?
- How to highlight the current page in the nav menu?
- CSS won’t style output of wp_nav_menu() correctly
- Where is definied the theme location for the main menu in a WordPress template?
- Some doubts about WordPress handle the horizontal main menu visualization
- .current_page_ancestor broken in Twenty Eleven
- Why nav_menu_css_class doesn’t work with apply_filters?
- 3 Level Menu Navigation (3rd Level not displaying)
- How do I middle-align my header menu items in WordPress [closed]
- Menu items description? Custom Walker for wp_nav_menu()
- How to define and link full path to css located at a random folder on header.php
- How to add posts to custom menus?
- How to add CSS class to custom logo?
- How to add custom css file in theme?
- How important is it to enqueue a theme’s stylesheet?
- CSS not updating in browser when I change it
- wp_nav_menu(), how to change class?
- Display Menu Name using wp_nav_menu
- Solutions for generating dynamic javascript / CSS
- Do I actually need to link my theme’s style.css in the theme files
- How can I display a menu on certain pages only?
- Enqueue a stylesheet for login page and make it appear in head element
- CSS classes for theme
- Add custom classes to anchor in wp_nav_menu
- Generating CSS Files Dynamically Using PHP Scripts?
- Add Caret to Menu Items with Sub-Menus in WordPress Theme
- Enqueue Stylesheets After Theme’s “rtl.css”
- How to limit wordpress menu depth in admin panel
- Are the WordPress Core CSS styles really all nessesary?
- Understanding wp_add_inline_style
- Any alternate TinyMCE4 themes / subthemes?
- Splitting WordPress theme CSS into multiple files, good or bad?
- Hide a div that is part of all pages on one specific page
- Why I can’t add a CSS style in this WordPress theme?
- wp_nav_menu sort order?
- Can’t get staging site to display same way as live site. Completely stumped
- How to make a theme with more than one CSS file?
- How to determine if custom menu is active?
- How do I check if a menu exists?
- Editing the custom background CSS
- How to use logout function on custom menu link?
- Any walker causes blank menu?
- How to edit an existing WordPress theme? [closed]
- How to display wp_nav_menu() conditionally only when not on a 404 page?
- Suggestions for creative use of post format feature, or themes that use them well
- How to add menu support to a theme?
- Add class to before_widget for all widgets with a dropdown and a counter
- Why max-width:97.5% on content images?
- add generated stylesheet from parent theme after child-themes style.css
- Add a preview to a WordPress Control Panel
- use add_action(‘wp_head’) in a widget for generating dynamic CSS styles
- Problem with registering menus – What to do when other solutions aren’t working?
- why does twenty eleven theme mix up the css measurement units?
- Add a #hash to the links in my custom menu
- Setting up partial Right-to-Left admin interface
- How can i change menu link when page content empty?
- Adding inline styles from a widget
- Can’t edit style.css in subdirectory of my theme?
- Adding dashicon fonts to the admin of pre 3.8 installs
- How to Handle CSS for Multiple Header header.php Files?
- Select menu on browser resize
- CSS in child theme not overriding the parent theme [closed]
- Extend walker – navigation, adding data attribute to a tag
- Get last modified date for menu link
- Replace Home with image link inside custom header menu
- Displaying wp menus by name without using theme locations
- Adding dashicon fonts to the admin of pre 3.8 installs
- Move my theme style.css into a folder
- Convert a static website to a WordPress theme and import all existing content
- How to keep theme layout the same when admin gray bar is present?
- Enqueued Stylesheets Effecting Admin Styles
- How to add nofollow to wp_nav_menu
- Custom CSS In Uploads Folder
- There’s an image named g.gif somewhere in my WordPress site
- wp_head() not inserting the default stylesheet style.css
- How do I add a post to a menu
- how to change WordPress menu markup/classes
- Writing Clean WooCommerce Styles
- Setting a Default ‘Theme Location’ When Creating a Menu
- WordPress nav_menu_css_class theme filter is not being called
- First completely customized theme, where should I start?
- Root Sage theme styles are not working!
- De-registering parent style sheet css recommended?
- Whats the safest way to output custom JavaScript and Css code entered by the admin in the Theme Settings?
- Alterntives to BEM syntax that comply with WordPress coding standards? [closed]
- Best practices: Custom theme sidebar menu – hardcode or widget?
- How do I highlight the menu for a child page?
- Custom Nav Walker Displaying Values in Sub Menu
- Modify the Additional CSS section (adding a disclaimer)
- how to set more than one menus to the same theme location
- Custom Nav Walker to show siblings and children of current branch?
- Sub folder CSS that’s read by Admin panel
- WordPress 5.8 update problem custom theme styles are overridden by core styles common.min.css
- WordPress default theme css units
- Create self-populating menu and add extra divs to the menu layout
- how to wrap tag in tag html to wordpress menu conversion
- Is it necessary to prefix every css class in a theme framework?
- current-menu-item class not working
- How to determine which custom header image is being shown
- Second menu not showing