current_menu_item is the active element in the menu, independent from the type (page, archives, post, etc.) of the current menu element, while current_page_item only available, if the current item is a page and is current.
For more details: http://codex.wordpress.org/Dynamic_Menu_Highlighting
Related Posts:
- Retrieving a list of menu items in an array
- Error: Declaration of MyClass::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl()
- Add Javascript to WordPress Menu
- Add custom menu item using wp_nav_menu_items filter
- Custom Post Types posts as submenus in Nav Menu
- Assign Menus to Theme Locations with theme activation
- wp_nav_menu() doesn’t apply correctly classes and IDs to menu and container
- Using filters to change href of nav menu page link
- replace current_page_item class in menu
- Adding attributes to link in wp_nav_menu using custom Walker function
- How to add current, parent, and ancestor menu item IDs to body_class()?
- How to manually add an item to a submenu in a menu generated by wp_nav_menu?
- Walker_Nav_Menu: put custom code between a particular
- Remove navigation from header in custom page template
- Add items to a menu dynamically
- How to create a custom menu item
- Disguise Multi-Page site as Single Page
- Change image based on menu item id
- Add div to specific sub-menu
- Add Bootstrap dropdown class to a nav menu
- WordPress Add javascript:void(0); to menu link item?
- Search box as a menu item in the nav menu output by wp_nav_menu?
- Making WordPress’ page and menus visible only for logged in users, checking session variables
- How can I put two menus in the same div?
- Add static item to wp_nav_menu
- WordPress – site with 2 stylesheets and more…
- Add nav menu CSS class to body
- Menu Custom link – using relative link when WP is in a subdirectory
- How to add a CSS class to the tooltip on a navigation menu?
- Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?
- WooCommerce dynamic menus
- Hide menu item based on user’s custom capability
- Auto add pages to primary menu with functions.php
- Add id to menu items in wp_nav_menu
- Add dynamic Sitemap to footer
- Making sub-menus exclusive [closed]
- Possible Menu Hack?
- how can i add css class on current page in wordpress wp_nav_menu
- How to rewrite the output of wordpress nav menu?
- Return Page/Post ID’s of Child WP_Nav_Menu items
- Add media library items to Menus using the Customizer (via Media Manager not URL)
- Custom Links menu items include in Search Results
- When clicking on menu item not going to specific page
- Static page to one page- menu inactive items highlighted
- Menu items suddenly are displayed all over the page [closed]
- Custom navigation structure with walker class
- CSS Classes (optional) on menu is not showing
- Why is only the first operation run in my loop – except for on the last repeat? [closed]
- Move Sticky Nav Menu Below WordPress Tool bar when tool bar enabled
- Prevent menu from loading in a page template [duplicate]
- How to use wp_nav_menu with hashtag links?
- Rename menu items for All except super admin
- Get Menus In Header.php FIle
- Add custom link on the fly to nav menu
- Custom register_taxonomy ins’t showing custom Nav menu
- Conditional menus based on page title
- How to test if a specific page is the front page?
- URL links consistent with menus?
- Strange menu behaviour wordpress admin [duplicate]
- Menu deletes all items and position – wordpress bug?
- changing the labels inside appearance -> menus for some for the fields
- Lost admin “manage_link” capability WordPress. No “Links” menu item in admin menu
- How to add active class to separate page link?
- dropdown menu, with walker
- Add function to custom menu
- Custom menu with additional logic for display
- Menu item that hides when you click the previous submenu
- How to get the Page Name of the current page?
- Putting footer links into different columns
- Add/remove image from navigation bar
- Swap out a page that is a parent to a many many pages
- How can I order these pages in this navigation bar on this old wordpress theme?
- wordpress walker add class to submenu a href
- Modifying Woocommerce menu based on tags and categories
- Display searchform in the menu
- Add href to tag in nav menu for mobile
- How to change navwalker’s dropdown mark-up?
- Bootstrap navbar responsiveness on WordPress theme menu not working
- Unable to remove page from primary menu
- Creating custom vertical menu
- Enable identical menu on network sites
- Show navigation header menu by post and categery
- How to add a toggle on the left side of my page?
- How to add buddypress sub-menu items to other menus
- Custom location for menu
- No indication of menu
- add custom entries to menu options
- How to select single category in menu if post have two categories?
- menu is only pulling in one item
- Showing a link with Javascript based on log-in status
- How to get current menu item “CSS Classes” value?
- Set menu item class into body
- Cannot control wp_nav_menu properly
- How to add drop down sub menu from database fields in the particular menu slug
- wordpress superfish dropdown menu
- Drop down menus css in custom menus
- Creating a custom menu
- List WordPress Custom Menu’s active parent level’s children as separate menu
- How to change the markup created by menu item only on chosen items?
- Database structure Menu Item