Highlight the Current Page Of A WordPress Navigation Menu

Share Now

Share on facebook
Share on pinterest
Share on twitter
Share on linkedin
Share on email

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
}

Nahid Mahamud

Nahid Mahamud

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