ACF Template Builder

Enabling and adding acf values that belong to another post

One of the things you can do easily using the ACF Template Builder is get the value of another postid's field. You can get any available field you want!

You will have to activate the postid attribute for the shortcodes. This is a small code-snippet that needs to be added to the functions.php file located in your theme-directory.
[pastacode lang="php" manual="add_filter(%20'bbacf%2Fhelpers%2Fsc_attr%2Ftype%3Ddefault'%20%2C%20'add_postid_sc_attribute'%20)%3B%0A%0A%2F**%0A%20*%20add%20the%20postid%20attribute%20to%20the%20default%20sc%20attr%0A%20*%20%40param%20%20%5Btype%5D%20%24array%20%5Bdescription%5D%0A%20*%20%40return%20%5Btype%5D%20%20%20%20%20%20%20%20%5Bdescription%5D%0A%20*%2F%0Afunction%20add_postid_sc_attribute(%20%24array%20)%20%7B%0A%09return%20array_merge(%0A%09%09%09%09%24array%2C%0A%09%09%09%09array(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'postid'%09%09%3D%3E%20null%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%0A%20%09%09%09)%3B%0A%7D" message="" highlight="" provider="manual"/]

After having enabled the postid attribute you can add the postid to your shortcode attributes.

[ bbacffield field="cover" postid="212" size="thumbnail" align="none" ]

will get the acf-field cover from the postid 212, even when that's not the postid for the current page.

Viable applications

using this you could use a page that is set to be private, has a fieldgroup attached that is comprised of several overal settings. If you want to use any of those settings, company logo or seasonal background, message or anything, you can use that on all your templates or temporarily change all instances of a shortcode.

[demo video will be here soon]