times / acf-to-wp-api

Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the 'acf' key
http://wordpress.org/plugins/acf-to-wp-api/
MIT License
203 stars 24 forks source link

ACF to WP-API

Join the chat at https://gitter.im/times/acf-to-wp-api

Contributors: chrishutchinson, kokarn, ramvi
Tags: acf, api, wp-api
Requires at least: 3.9.0 Tested up to: 4.7.3 Stable tag: 1.4.0 License: MIT
License URI: http://opensource.org/licenses/MIT

Plugs Advanced Custom Fields (ACF) data into the WordPress JSON API (WP-API).

Description

Puts all ACF fields from posts, pages, custom post types, comments, attachments and taxonomy terms, into the WP-API output under the 'acf' key. Creates a new /option endpoint returning options (requires ACF Options Page plugin).

Installation

  1. Unzip and upload the acf-to-wp-api directory to /wp-content/plugins/.
  2. Activate the plugin through the 'Plugins' menu in WordPress

Frequently Asked Questions

How can I log and issue or contribute code?

See the CONTRIBUTING.md file.

How can I filter posts on a custom field?

See issue #13 for example code to do this.

Options Endpoints

/wp-json/wp/v2/acf/options

Request a list of all options configured in ACF

/wp-json/wp/v2/acf/options/{option-name}

Request a specific option, by passing in the option name

Changelog

1.4.0

1.3.3

1.3.2

1.3.1

1.3.0

1.2.1

1.2.0

1.1.0

1.0.1

1.0.0