WordPress Quick Tip: Custom Link Current Class in Menu

Yesterday, a custom link in my menu wasn’t getting the current-menu-item class. Why? I’d used a relative, instead of absolute, URL in the link.

So instead of this:

/products/a-product-in-the-main-nav

do this:

https://www.example.com/products/a-product-in-the-main-nav

Done!