I've got a site which has tabs ontop for every level 1 page i added in the admin of WP. I fetch the pages with wp_list_pages('title_li=&depth=1') and wordpress puts current_page_item as class for the active page nicely. This works as its supposed to but now i've come to the point where i'm adding subpages to each level 1 page and i would like the highlighting on the top to remain in place even if you are visiting a page at depth 2 or deeper.
I know this it's possible with hardcoded menu's but thats no option since i'm generating the menu dynamically with wp_list_pages.
Next to that i have a secondary navigation in place which displays the current subpages of the selected tab.
This is what i'm basically asking for: it would be perfect if someone knows a way to apply the current_page_item class not only to the current page in the menu but to every parent page of the current page in the menu too.