acf-to-rest-api icon indicating copy to clipboard operation
acf-to-rest-api copied to clipboard

Show in rest not visible on admin

Open Ruxiio opened this issue 4 years ago • 3 comments

I have added the below filter to the functions.php file as covered in https://github.com/airesvsg/acf-to-rest-api/issues/254:

// Enable the option show in rest
add_filter( 'acf/rest_api/field_settings/show_in_rest', '__return_true' );

I still can not see the show in rest option. I have one field group that is returning ACF fields. All other requests return 'acf : false'. I am not sure how else to enable the fields.

Ruxiio avatar Apr 08 '20 23:04 Ruxiio

Try to put in the top of the functions.php. Worked for me.

diegocgaona avatar May 07 '20 23:05 diegocgaona

Hi @Ruxiio, I have created a plugin that adds this behavior quickly.

https://github.com/gabfiocchi/acf-to-rest-api-extend/releases

gabfiocchi avatar May 31 '20 11:05 gabfiocchi

Could be php caching? I wasn't seeing any change after editing my functions.php page. Took me a while to work out that you have to restart php after each edit if you have php opcache turned on. Doh!!

robtoll avatar Jan 07 '21 12:01 robtoll