WP-REST-API Menus

WP-REST-API Menus Install Statistics

0
100%
Today: 0 Yesterday: 0 All-time: 1,646 downloads
WP-REST-API Menus Icon

Try plugin: WP-REST-API Menus

We'll create fresh WordPress site with WP-REST-API Menus installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About WP-REST-API Menus

Adds menu endpoints to core WP REST API.

0


0


0


0


0

updated: 6 years ago
since: 6 years ago
author: Jeff Cicero

Description

This plugin adds “routes” or “endpoints” to WP REST API that allows for retrieval of
menu data as JSON.

Updated port of “WP-REST-API V2 Menus” by Claudio La Barbera (http://www.claudiolabarbera.com)

Usage

Get all registered menus:

GET /wp-menus/v1/menus
https://yourwpsite.com/wp-json/wp-menus/v1/menus

Get menu data as JSON from menu slug:

GET /wp-menus/v1/menus/{slug}
https://yourwpsite.com/wp-json/wp-menus/v1/menus/{slug}

Gets the contents of a registered menu by its “slug”.

When assigning a menu a location in /wp-admin/nav-menus.php?action=locations
the slug is the name of the menu in lowercase and without any spaces like a post slug.

If your menu name is Main Menu:
https://yourwpsite.com/wp-json/menus/v1/wp-menus/main-menu