Get a WordPress menu from a specific menu location

Sometimes you know that you want a WordPress menu associated with a particular menu location, but you don’t know for sure which menu is associated with that location.

To find out which menu it is (I typically want to know the slug) you can do something like the following.

https://gist.github.com/nickdavis/25d4a733b7c2754ca1e34db31a735bb0

Leave a Reply

Your email address will not be published.