Wordpress Get a Post does not set/return ACF fields

:bullseye: What is your goal?

Retrieve ACF fields from wordpress get a post, aka Advanced Custom Fields.

:thinking: What is the problem & what have you tried?

The wordpress ‘create a post’ with advanced selected, allows settings up custom fields, but the get a post does not retreive them once they are set

:clipboard: Error messages or input/output bundles

Not an error, but lacking functionality in a complimentary set of features, ie ‘create’ allows the creation, but ‘get’ does not retrieve.

Simple to test
pre-setup (create a custom post type with attached ACF field group on wordpress)
make senario

  1. set up wordpress connection
  2. create a post to the new post type and set some of the custom fields (must enabled advnaced features in create a post)
  3. add a ‘get wordpress post just created’, notice data does not come back

Does anyone know how to work around this? There is a wordpress ‘make api’ call, but figured I’d ask before digging into that effort.

Hello

Yeah, you’re not missing anything — Get a Post simply doesn’t return ACF :man_facepalming:

Curious though: have you tried exposing ACF to the REST API and checking if it shows up via a raw API call? That’s the only path I’ve seen work so far.

I figured it would be easy to expose via direct api call, or heck embed as JSON within the content/excerpt as a hack.

Okay figured it out, super easy! And yes you can get the ACF fields without mucking about.

Go into your wordpress site, to the ‘make’ plugin | custom api settings, and enable the ones you are wanting. By default any ‘custom’ fields are disabled, so that’s the real reason they don’t percolate through.

Golly we learn something new everyday.

3 Likes

Welcome to the Make community!

This is correct. For more information, see Wordpress — Custom Fields in the Help Centre, which says:

To work with the custom fields you want to include in your module output, you need to activate them in the Make Connector plugin.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

Hi Brian! :waving_hand: Thank you for taking a second to come back to the Community and let everyone know how you solved the problem :slight_smile: It’s always useful for the other users to see the solution :make:

1 Like