Adding current-page-ancestor class
-
Hello,
I selected a post from my News page. My Stories list item was then unclassed and the News list item had the class “current_page_parent”. I would have expected the Stories list item to be “current-page-ancestor” and the News page to be “current_page_parent”.
The only way I can think of overcoming this is to do something like:
if($post->post_parent == '111'){ // if the parent is the News page add class .current-page-ancestor to list item 3 in the #access menu }
But I don’t know enough php to do the code, or where to put it but I know the #access menu is in header.php.
Regards,
Andy
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding current-page-ancestor class’ is closed to new replies.