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
- Do I actually need to link my theme’s style.css in the theme files
- CSS classes for theme
- How to limit wordpress menu depth in admin panel
- Splitting WordPress theme CSS into multiple files, good or bad?
- How do I check if a menu exists?
- 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 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?
- Extend walker – navigation, adding data attribute to a tag
- Replace Home with image link inside custom header menu
- Move my theme style.css into a folder
- How to keep theme layout the same when admin gray bar is present?
- Enqueued Stylesheets Effecting Admin Styles
- 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
- First completely customized theme, where should I start?
- Alterntives to BEM syntax that comply with WordPress coding standards? [closed]
- Best practices: Custom theme sidebar menu – hardcode or widget?
- WordPress default theme css units
- current-menu-item class not working
- How to remove class attributes from custom menu markup?
- enqueue_style is not working
- menu behavior is not as expected
- Part of Menu Item Hidden on Header Menu
- How do the default themes reference style.css?
- which is the best way to customize nav-menu-template.php?
- Create wordpress header with custom logo in between the menu splitting the menu into two equal parts [closed]
- Is it possible to edit the styling of the admin panel from within a custom theme?
- My Admin bar covers my sticky navbar [closed]
- WordPress is adding margins and padding to my custom menu?
- Menu item added in wp_nav_menu_items filter is never highlighted
- multisite: global menu containing network site links?
- What are the Entry classes for?
- Single-level menu option? Another way?
- Using a page as home, how do I prevent nav from setting both home and page links active?
- How to append to menu items selectively
- How to edit my theme for full width?
- How to add styles set by user in the customizer
- Show woocommerce categories on my theme menu styling
- How remove render blocking css from wordpress when you build a theme?
- Following Web Performance Optimization techniques to output static and dynamic css
- Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?
- Displaying icon image for WordPress post formats, is there a cleaner way to do this?
- Internal Stylesheet in WordPress Theme development
- Child Theme header1.php file not overwriting parent theme’s header1.php file
- 3 Level Deep Navigation Menu Not Showing All Levels
- How to Create custom xml file for demo content for custom theme?
- Theming Using Bootstrap Glyphicons and WordPress Dashicons
- Broken theme, template is missing
- How to add menù section to my WordPress template?
- Having issue with WordPress wp_enqueue_style
- theme-independent CSS/JS files
- Navbar- disable “onClick” drop-down
- Customize Option Framework
- Can’t change theme name
- my single.php is mixup on some post for no reason
- Custom menu: Link names
- How to format the first line of a post differently?
- Parent/Child pages
- How to substitute old wordpress menu by wp 3 menu the right way?
- Archives and Categories in Custom Menu
- How to create a robust and logic class naming system in WordPress theme developing?
- Theme: dropdown hover menu not showing up in IE/Edge
- Pages not displaying as sections on static page
- overlay post title over post’s featured image
- Need help with adding custom wordpress menu and sub-menu
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- How to fix an issue with customizer live preview?
- Fallback dosen’t work when not using ‘menu’ attribute
- How to add custom nav_menu_css_class to certain menu only?
- WordPress doesn’t recognize submenus as so I can’t style them properly
- Primary Menu Showing All Pages With No Sub-Nav
- Custom CSS no getting applied
- WordPress 3.9 two menus in same position?
- editor style css and page template with and without sidebar
- Why the slideshow is not shown in my theme?
- How can I change the title of the Home link in the navigation bar?
- Custom link color or stylesheets
- How to make navigation a list without a plugin? [duplicate]
- What is The Best Way to Make Parallax header effect for wordpress theme ?? pure CSS or using JavaScript? [closed]
- Why don’t ‘wp_nav_menu’ CSS classes work until a menu is created?
- Dynamic nav menu with icons [closed]