Saturday, January 14, 2023
HomeWordPress Developmentplugin growth - Make time period slugs of customized taxonomy accessible in...

plugin growth – Make time period slugs of customized taxonomy accessible in WP REST API for customized put up sort?


When taking a look at the docs of the doable fields for the WP Submit REST useful resource, there’s the tags discipline listed as an array:

The phrases assigned to the thing within the post_tag taxonomy.

I now puzzled: Are you able to someway register this on your customized put up sort + taxonomy? Such that, for instance through:

GET https://instance.org/wp-json/wp/v2/your_custom_post_type/13?fruit_tax

You get all phrases of the fruit_tax customized taxonomy related to your put up of sort your_custom_post_type with put up ID 13 ?

I want this as a result of I want to typically retrieve the worth of a taxonomy time period related to a customized put up sort, when retrieving the customized put up sort (by which case you’ll technically in all probability use a meta worth); however in different moments, I want to question the customized put up sort in perform of a fruit_tax worth, for which somewhat taxonomies are advisable, as I understood issues to date.

In fact a workaround could also be to retailer the information each as a customized taxonomy worth in addition to a customized meta worth for each created put up, however I am searching for an answer that will not duplicate information and question quick.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments