0
votes

I want to display posts from WordPress REST API, it's a custom post type where I wanna display in my case :

I have single custom post type post from REST API, point is to get taxonomy term from REST, e.g.

...
"wp:term": [
      {

        "taxonomy": "examplestatus",

        "embeddable": true,

        "href": "domain.com/wp-json/wp/v2/category?post=217"

      }

]
...

I can get an example term but I must create one new request to "href" part, it can be robust. How to solve in a different way? New field? Register one : https://developer.wordpress.org/reference/functions/register_rest_field/

Thanks!

1

1 Answers

0
votes

First, check if the "show_in_rest" argument is set to true in the custom taxonomy registration. If you are using a plugin, look in the settings of the custom taxonomy. If you have coded the registration yourself, look in that location (usually functions.php).