I have a custom menu that is structured by a parent-child-subchild-and so on hierarchy. On each parent menu item (of which only six exist) there is a special picture I want to show in the corner of the website.
I now need a way to set a condition like this (this is fantasy-code of course):
if (current_parent_menu_item == "Home") : echo "Picture01"; endif;
if (current_parent_menu_item == "About") : echo "Picture02"; endif;
and so on…
I have no idea how I could access or ask for the current parent menu item.
Can anyone help?
Thanks a lot!
Sebastian
You should be using a walker class for this kind of stuff. Here is a simple walker class that you can use
If you just want to get over it, then you should use jquery to add the html to the parent element. You can do something like this.