WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
up vote 4 down vote accepted

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

share|improve this answer
current_page_item is added for backwards compatibility for themes that only support the older wp_page_menu() menus, which only had pages in them. So if you are creating a theme now it's best to use current-menu-item. – Jan Fabry Apr 19 '11 at 9:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.