We’ve been busy these weeks working in a major feature for Rest Routes. After noticing that many of our clients are actively using ACF and ACF Pro for building custom fields, we’ve decided to integrate it with our Pro plugin. Now, you can easily expose ACF custom fields through your custom endpoints built with Rest Routes Pro.
You will be able to display any kind of ACF custom field, not only single but also repeating ones. We really hope that you enjoy this feature as much as we did while developing that.
Let’s first create our new Route:
We are going to have only one endpoint for this route. So, let’s select the GET method as well as the purpose of the endpoint (Display Posts).
Now, it is time to define the output of the endpoint. For this, let’s select three fields: post_title, locations (custom field) and state_resources (custom field). At this stage it is very important that you pay attention to the custom field names, it must be exactly like the ones you defined once creating those on ACF.
How to display Toolset custom fields with Rest Routes In this post we will learn a bit about the compatibility work that we’ve done recently
How to create custom endpoints for ACF Pro custom fields In this post we will learn a bit about the compatibility work that we’ve done
How to create custom endpoints for custom tables on WordPress In this post we are going to show you how easy is to create custom
How to create custom endpoints for WordPress REST API without code In this post you will learn how to build a few types of custom