Articles (23)

How to Add Variables to WordPress Menu Items

Would you like to use variables on certain menu items? Perhaps you want to count a category and display that total alongside your label. We’ll show you how to do that in this quick guide.

Get the Category from the URL in WordPress

This bit of code will take the current URL as seen in the browser, explode (separate) it by / and then create an array that includes the category id, name, slug etc, then put’s them into variables for easy access.