Highlight the Current Page Of A WordPress Navigation Menu

Share Now

If your theme supports WordPress menus, then you already have a built-in class which will make it super easy to highlight the current page being viewed.

By default, WordPress menus output this class with the list item: current-menu-item


li.current-menu-item a {
text-decoration: underline;
background: #333;
color: #fff
}

Picture of Nahid Mahamud

Nahid Mahamud

Web Developer | Graphic Designer | WordPress & Woo-commerce Expert