Site logo

Archived topic

ACF block in dynamic template for CPT

5 replies · Started by Dan on September 5, 2021

Viewing posts 1–6 of 6

Hi
I would like to know if this is possible:
Create a dynamic content template for a custom post type (GPP + GB), which includes an ACF block that the user can later add data to (in the block).
so when the user creates a new post he will have the ACF block in the page waiting for data insert.

Thanks!
Dan

Thank you Elvin,
but does GP support adding a ACF block (with multiple fields) in the template? I didn't see you mentioned that.

Dan

Hi there,

Content Templates replace the themes content.php - they don't return anything inside the post content or the post editor.
But to cover what Elvin said, any single value ACF field ( added via the ACF Meta Box ) can be included in the Content Template.

Thanks David,
So for the 'simple' ACF fields I can use the heading block with the dynamic option, but for more advanced fields (repeater for example) or even ACF blocks, this cannot be achieved via the content template.
Will GP introduce a template editor, where I can create a complex page which includes various types of blocks layouts (including custom blocks)? A template that can be then controlled in a centralized way where making a change will also be applied to all pages based on that template (like page, single and CPT template behave)?

Thanks for your support,
Dan

You can add ACF ( or any custom field ) to any of the GB / GP Blocks that support the Post Meta type. Not just the Headline Block :)
And you're not limited to just using GB / GP Blocks in Block Elements. If you want to add a custom Block whether that be ACF or your own making you can. And as alternative, you can also add shortcodes.

This archived topic is closed to new replies.