[WordPress] 外掛分享: EndPointy Menus

首頁外掛目錄 › EndPointy Menus
WordPress 外掛 EndPointy Menus 的封面圖片
全新外掛
安裝啟用
尚無評分
117 天前
最後更新
問題解決
WordPress 5.0+ v1.1.0 上架:2025-12-15

內容簡介

**總結:**
EndPointy Menus外掛可將您的WordPress導航菜單以JSON格式暴露在自訂REST API路徑上,讓您可以輕鬆讀取菜單結構。

**問題與答案:**
1. 什麼是EndPointy Menus外掛的基本名稱空間?
- 答:endpointy-menus/v1

2. GET /wp-json/endpointy-menus/v1/menus會返回什麼數據?
- 答:返回所有註冊的菜單,包括位置和項目。

3. 如何通過GET /wp-json/endpointy-menus/v1/menus/<id>來查詢特定菜單ID的單個菜單及其項目?
- 答:使用GET /wp-json/endpointy-menus/v1/menus/<id>。

4. 如何通過GET /wp-json/endpointy-menus/v1/locations來查詢所有註冊的菜單位置及分配的菜單?
- 答:使用GET /wp-json/endpointy-menus/v1/locations。

5. 如果想返回具有父子關係的分層樹結構的菜單項目,應如何使用Query Parameters?
- 答:使用nested=true,例如:/wp-json/endpointy-menus/v1/menus/2?nested=true。

6. 希望直接從前端應用程式或API客戶端使用這些URL,應如何處理?
- 答:直接使用提供的URL。

7. 若想支持開發者,可以通過哪些途徑進行支持?
- 答:網站:[https://gunjanjaswal.me](https://gunjanjaswal.me)
GitHub:[https://github.com/gunjanjaswal/Endpointy-Menus](https://github.com/gunjanjaswal/Endpointy-Menus)
Buy Me a Coffee:[https://buymeacoffee.com/gunjanjaswal](https://buymeacoffee.com/gunjanjaswal)

8. 如何貢獻或提交問題和功能請求給EndPointy Menus外掛?
- 答:透過GitHub:[https://github.com/gunjanjaswal/Endpointy-Menus](https://github.com/gunjanjaswal/Endpointy-Menus)
問題:[https://github.com/gunjanjaswal/Endpointy-Menus/issues](https://github.com/gunjanjaswal/Endpointy-Menus/issues)

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「EndPointy Menus」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

EndPointy Menus adds custom REST API routes to expose your WordPress navigation menus as JSON.
Base namespace: endpointy-menus/v1
Endpoints:

GET /wp-json/endpointy-menus/v1/menus
Returns all registered menus with locations and items.

GET /wp-json/endpointy-menus/v1/menus/
Returns a single menu and its items by menu ID.

GET /wp-json/endpointy-menus/v1/locations
Returns all registered menu locations with assigned menus.

GET /wp-json/endpointy-menus/v1/locations/
Returns a menu assigned to a specific location (e.g., ‘primary’, ‘footer’).

Query Parameters:

nested=true – Returns menu items in a hierarchical tree structure with parent-child relationships.
Example: /wp-json/endpointy-menus/v1/menus/2?nested=true

This is useful for headless WordPress setups or any external app that needs to read your menu structure.
Usage
Example requests:
Get all menus:
https://your-site.com/wp-json/endpointy-menus/v1/menus
Get single menu by ID:
https://your-site.com/wp-json/endpointy-menus/v1/menus/2
Get all menu locations:
https://your-site.com/wp-json/endpointy-menus/v1/locations
Get menu by location (e.g., ‘primary’):
https://your-site.com/wp-json/endpointy-menus/v1/locations/primary
Get nested menu structure:
https://your-site.com/wp-json/endpointy-menus/v1/menus/2?nested=true
https://your-site.com/wp-json/endpointy-menus/v1/locations/primary?nested=true
Use these URLs directly from your front-end application or API client.
Support the Developer
If you find this plugin useful, you can support the developer:

Website: https://gunjanjaswal.me
GitHub: https://github.com/gunjanjaswal/Endpointy-Menus
Buy Me a Coffee: https://buymeacoffee.com/gunjanjaswal

Contributing
Contributions, issues, and feature requests are welcome!
GitHub: https://github.com/gunjanjaswal/Endpointy-Menus
Issues: https://github.com/gunjanjaswal/Endpointy-Menus/issues

延伸相關外掛

文章
Filter
Apply Filters
Mastodon