Advanced Custom Fields REST API Filter is a WordPress plugin that extends the REST API by:
✅ Adding all ACF fields to REST API responses.
✅ Enabling filtering by any ACF field dynamically via query parameters.
- Automatically includes ACF fields in REST API responses.
- Allows filtering posts by any ACF field using query parameters.
- Supports multiple filters at once.
- Open-source and lightweight.
- Download the plugin as a
.zip
file or clone the repository. - Upload the folder to
wp-content/plugins/acf-rest-filter/
. - Activate the plugin from the WordPress admin panel.
Make a GET request to:
https://example.com/wp-json/wp/v2/work
This will return all posts with an acf
object containing the ACF fields.
https://example.com/wp-json/wp/v2/work?acf_filter[featured]=1
Filters posts where the ACF field featured
is true
(1
).
https://example.com/wp-json/wp/v2/work?acf_filter[category]=design&acf_filter[status]=active
Filters posts where category = design
and status = active
.
This plugin is open-source and licensed under the MIT License.
Developed with ❤️ by Othmane N.