Skip Navigation

[Resolved] Create a customize endpoint with custom type

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years ago.

Assisted by: Luo Yang.

Author
Posts
#1897993

I have a custom custom type and I need to create an endpoint that fetches less data that I don't need. how can I do it?

#1898247

Hello,

It needs custom codes, I suggest check WP document:
https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/
Adding Custom Endpoints
The WordPress front-end provides a default set of URL mappings, but the tools used to create them (e.g. the Rewrites API, as well as the query classes: WP_Query, WP_User, etc) are also available for creating your own URL mappings, or custom queries.

I see you have some questions about customize WordPress REST API, it is better to read some WP REST API documents:
https://developer.wordpress.org/rest-api/

For your reference.