This tutorial provides the code to automatically add space separated category slugs as classes to nav menu items that link to single posts in WordPress.
Could be useful for styling the menu items based on categories when using a plugin like Category Posts in Custom Menu.
Add the following in child theme's functions.php:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Find my tutorials helpful and wish to donate?