Skip to content

Snippet: Active Menu Item When Viewing Portfolio Posts

Make sure to change the 300 to the ID of your menu item you are targeting. You can view this by inspecting your source code. If you prefer you can use PHP instead to add the current-menu-item class to the menu items instead, this way the active item will take on the same styles as your other active items automatically.

body.single-portfolio #site-navigation .dropdown-menu > li#menu-item-300 > a {
 /* Your Custom CSS Here */
}
Back To Top