Retrieve data from ACF to the field

Hi there,

I want to retrieve data from ACF to the field.
I have an ACF field called price.

This is the code I use:
{brf_acf_field:price:134} or {brf_acf_field:acf_price:134}

None of them works.

Thanks

Have you activated the “Dynamic Data Tags” extension?
Also, is 134 the correct post ID in that case?

Hi Daniele,

Thanks for your reply.
Yes, I have activated Dynamic Data Tags. I can pull the data such as post title, post content but not from ACF field… Post ID is correct!

Possible that it’s a field from an ACF Options page? If no, could you try to use {brf_post_meta:meta_name:post_id}? Should work as well for acf fields if the meta name is correct.

Test: {brf_acf_field:price:134} - NOT WORKING
Test2: {brf_post_meta:price:134} - NOT WORKING
Test3: {brf_post_title:134} - IT WORKS (but its post title)

Here is the ACF setup

Figured it out… it seems price is a reserved word!
Just tried with capacity and I got the value…

Both {brf_acf_field:capacity:134} and {brf_post_meta:capacity:134} WORKS…

Do we have any list for reserved words so we avoid in the future?

1 Like

Good catch :slight_smile: There is no Bricksforge list of reserved words, as Bricksforge does not reverve them. I guess it’s a WooCommerce thing here :slight_smile: But good to know.

A general list of reserved WooCommerce terms can be found here: Reserved Terms « WordPress Codex but this list does not contain WooCommerce related terms though.

Thanks, I have also WooCommerce installed and it might be a conflict from there as you said…
Happy that I got it sorted. :slight_smile:

1 Like