How can I add a class to a nav li depending on URL?
Here is the solution. To set it up: Paste the following at the bottom of the file functions.php in the folder of your current theme. Edit by the 🟢 in the code` $when_on_one_of_these_page_slugs should be an array of strings. The strings are the slugs of the pages on where you want the rule to kick … Read more