Answer the question
In order to leave comments, you need to log in
How to add the current-menu-parent class to the main menu item "Blog" in Wordpress when opening a post?
Currently, when viewing a single entry, the menu item loses all classes of the active item.
Answer the question
In order to leave comments, you need to log in
General principle:
if( is_single() ){
echo 'class="current-menu-parent"';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question