(just got reccommended to post this over here from stack overflow…)
I am just starting with WordPress (defecting from Joomla)- having a bit of difficulty getting started.
One thing I am trying to do is make a custom plugin that allows the user to add custom backgrounds to the site, based on the active menu item.
So what I am trying to do is get the active menu id (like ‘menu-item-xx’ that is added to the nav li’s) and active parent menu id so I can add these to the body classes.
Is this something I can get from anything built into WordPress or is this something I will need to make a custom for?
Any pointers most welcome…
UPDATE
I have solved this now with a custom function that you can find below