LocoAI
89LocoAI - Auto Translate For Loco Translate is a powerful tool for developers looking to quickly translate thei...
Add menus endpoints to WP REST API
WP REST Menus is a WordPress plugin that adds new REST API endpoints for registered menus. It allows developers to retrieve menu data, including all menus, menu items by ID, and menu locations, which can be useful when building single-page applications (SPAs) with frameworks like Vue.js or React.
This plugin is particularly suited for developers looking to integrate WordPress menus into custom front-end applications. It works with Advanced Custom Fields, WPML, and Polylang, making it versatile for multilingual sites and custom field usage.
Best for: Developers building SPAs or custom front-end applications using WordPress menus.
What it does well
Where it falls short
WP REST Menus provides useful functionality for developers needing menu data via REST API. However, the lack of detailed documentation may pose challenges for some users.
skapator's own description of WP REST Menus, lightly tidied.
This plugin adds new endpoints for WordPress registered menus.
Usefull when building SPAs with Vuejs, React or any front-end framework.
Works with Advacned Custom Fields, WPML, Polylang
The new endpoints available:
Get all menus
GET /menus/v1/menus
// Response sample
{
term_id: 2,
name: "Main Menu",
slug: "main-menu",
term_group: 0,
term_taxonomy_id: 2,
taxonomy: "nav_menu",
description: "",
parent: 0,
count: 8,
filter: "raw"
},
...
Get a menus items by id (term_id)
GET /menus/v1/menus/<id>
// Response sample
{
ID: 5,
post_author: "1",
post_date: "2018-07-03 06:42:18",
post_date_gmt: "2018-07-03 06:42:18",
filter: "raw",
db_id:5,
menu_item_parent: "0",
object_id: "5",
object: "custom",
type: "custom",
type_label: "Custom Link",
title: "Home",
url: "https:\/\/wp-rest-menu.local\/",
target: "",
attr_title: "",
description: "",
classes: [
""
],
xfn: "",
meta: null
},
...
Get all menu locations
All menu locations assigned in /wp-admin/nav-menus.php?action=locations
GET /menus/v1/menus/locations is deprecated and will be removed in newer versions use:
GET /menus/v1/locations
// Response example
{
slug: "top",
description: "Top Menu"
},
{
slug: "social",
description: "Social Links Menu"
}
...
Get all menu location items
All menu locations assigned in /wp-admin/nav-menus.php?action=locations
GET /menus/v1/menus/locations/<slug> is deprecated and will be removed in newer versions use:
GET /menus/v1/locations/<slug>
// Response samexampleple
{
ID: 5,
post_author: "1",
post_date: "2018-07-03 06:42:18",
post_date_gmt: "2018-07-03 06:42:18",
filter: "raw",
db_id:5,
menu_item_parent: "0",
object_id: "5",
object: "custom",
type: "custom",
type_label: "Custom Link",
title: "Home",
url: "https:\/\/wp-rest-menu.local\/",
target: "",
attr_title: "",
description: "",
classes: [
""
],
xfn: "",
meta: null
},
...
There are two filters availiable:
Fields Filter
// it will return only the fields specified
GET /menus/v1/menus/<id>/?fields=ID,title,meta
// Response sample
// Response sample
{
ID: 5,
title: "Home",
meta: null
},
...
Nested Items Filter
// it will return menu items parents and nested children in a 'children' field
// Currently only one level deep is supported
GET /menus/v1/menus/<id>/?nested=1
// Response sample
{
ID: 1716,
menu_item_parent: "0",
object_id: "174",
object: "page",
title: "Level 1",
meta: {
vue_component: "LevelComponent",
menu-item-field-01: "Field 1 value",
menu-item-field-02: "Field 2 value"
},
children:[
{
ID: 1717,
menu_item_parent: "1716",
object_id: "744",
object: "page",
title: "Level 2b",
meta : {
vue_component: null
}
},
...
]
},
...
WP filter hooks
Other plugins for integrating services.
LocoAI - Auto Translate For Loco Translate is a powerful tool for developers looking to quickly translate thei...
The AI + Automation plugin for WordPress. Automate workflows across all your plugins and apps, add an AI agent...
Create custom interactive maps with free Leaflet-based styles, no Google Maps API key, frontend marker submiss...
Monitor every change on your WordPress site — who did what, when, and where it came from — for a complete audi...
No API key required. Display Yelp and Google reviews for any business in a clean, customizable feed on your si...
Contact Form, Google Sheet, MailChimp, Brevo, Webhook, Zoho CRM Automation and Integration plugin that Connect...