Created
March 4, 2015 17:13
-
-
Save jessepearson/44e4a42a228465748301 to your computer and use it in GitHub Desktop.
Functions to add a parent count to WordPress nav menus. This is useful if you need to change nav element size based on the number of parent/top level elements.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this. It wasn't exactly what I was looking for -- if menu item is a parent, assign a class to it -- but it put me in the right direction of creating an array of parents and adding items to it, then going through said array for each item. Thanks!