Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
I found an answer by searching in similar posts and links. I added a line to fit my needs (I wanted to prevent my blog page to get highlited when on a custom post).See this line: unset($classes[array_search(‘current_page_parent’,$classes)]); Solution function add_parent_url_menu_class( $classes = array(), $item = false ) { // Get current URL $current_url = current_url(); …