Remove current_page_parent from posts page link in WordPress nav menu
I assuming you’re using wp_page_menu() or wp_list_pages(). If so, then what you need to do is hook into the page_css_class filter, e.g., add_filter (‘page_css_class’, ‘my_func’, 10, 5) ; function my_func ($classes, $page, $depth, $args, $current_page_id) { if (/* test condition */) { $classes = array_diff ($classes, array (‘current_page_parent’)) ; } return ($classses) ; } where … Read more