3

Hi I have created a custom post type using pods io. Whenever I hit the rest API for a custom post type, I get data for all the posts created using that post type. But what I need from rest API is the configuration of that post type.

That is I need to fetch the label and field type (ex plain text, file/video/image, wysiwyg) for that post type. enter image description here

As shown in the figure above, I need to fetch all the fields information for a particular custom post type.

Is that possible in wordpress using Rest API. Or is there any plugin which does that.

My requirement is that I want to configure fields of different types and I want to fetch fields information for that page. Any plugin which does that would be helpful.

2

On the "REST API" tab, you should be to enable the new post type to show all the custom fields in the standard WordPress REST API.

Also, in each field's options, you should be able to set if that field should be viewable and/or editable via the API, if you only want to show a few fields.

After that, you should be able to see the endpoints for your custom post type in http://example.com/your_wordpress_site/wp-json/wp/v2

0

Take a look what's included in the schema for the endpoint, if that's not enough you need to create your own endpoint and fetch that data from pods! Feel free to contribute your code to pods https://github.com/pods-framework/pods

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.