unfulvio / wp-api-menus

:abcd: Menu routes for WordPress JSON REST API.
https://wordpress.org/plugins/wp-api-menus
GNU General Public License v2.0
140 stars 59 forks source link

Possible to retrieve menu by slug not ID? #46

Open MichaelLSmith opened 6 years ago

MichaelLSmith commented 6 years ago

It would be great to a menu using its slug in the in the URL such as:

wp-json/wp-api-menus/v2/menus/slug-name

How hard would this be to implement?

mckernanin commented 6 years ago

I'll look into it, that would definitely be helpful!

MichaelLSmith commented 6 years ago

Thanks. I tried forking the plugin and doing it myself, but I still have lots to learn! If you get it, let me know how you did it.

MichaelLSmith commented 6 years ago

I also just noticed that when finding a particular menu by location, it's not retrieving the slug of each menu item.

drewcovi commented 6 years ago

any updates or PRs for this? it would be a lot more useful to query by slug not ID in many use cases.