Whats the difference between current_page_item and current-menu-item when using Custom Menus

.current_page_item{} // Class for Current Page
.current-cat{} // Class for Current Category
.current-menu-item{} // Class for any other current Menu Item
.menu-item-type-taxonomy{} // Class for a Category
.menu-item-type-post_type{} // Class for Pages
.menu-item-type-custom{} // Class for any custom item that you added
.menu-item-home{} // Class for the Home Link

1
1

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

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *