內容簡介
這個外掛可新增獨立的 WordPress REST API(v2)端點,包含現有文章類型之間及其關聯的分類法(taxonomies)。
當您需要建立一些篩選器時,了解目前文章類型所附加的種類法非常有用。
例如,使用wp-json/wp/v2/post-type-taxonomies請求,您可以獲得以下信息(不包括空結果):
{
post: [
"category",
"post_tag",
"post_format"
],
portfolio: [
"technologies",
"clients",
"work_types"
]
}
查看我的其他有用的 rest-api 外掛:https://wordpress.org/plugins/tags/andrew-magik-rest-api。
外掛標籤
開發者團隊
② 後台搜尋「WP REST API – Post Type Taxonomies」→ 直接安裝(推薦)
原文外掛簡介
This plugin will add separate WordPress REST API (v2) endpoint, with all relations between existing post types and attached to them terms (taxonomies).
It is very useful when you need to create some filters, when you want to know what taxonomies are attached to the current post type.
For example what can you get, using wp-json/wp/v2/post-type-taxonomies request (empty results not included):
{
post: [
"category",
"post_tag",
"post_format"
],
portfolio: [
"technologies",
"clients",
"work_types"
]
}
Check my other useful rest-api plugins: https://wordpress.org/plugins/tags/andrew-magik-rest-api.
