Home Forums General Issues Enable REST API via PHP


Enable REST API via PHP

  • Hi,

    I’m using ACF 5.11, more specifically via ACF-Builder and I’m wondering how I enable Show in REST API for posts, pages and CPTs.

    Is there a way to enable all/specific ACF fields for a particular post type when registering a field group?


  • Ended up looking through the ACF source, and spotted a configurable field 'show_in_rest' => false. Overriding this in the ACF-Builder instantiation did the trick. i.e.

    $eventDateTime = new FieldsBuilder('event_dates_times', [
    	'title'        => 'Dates',
    	'position'     => 'side',
    	'show_in_rest' => true
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.