- This topic has 5 replies, 3 voices, and was last updated 4 years, 6 months ago by
David.
-
AuthorPosts
-
September 5, 2021 at 2:42 pm #1919842
Dan
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!
DanSeptember 5, 2021 at 8:21 pm #1919965Elvin
StaffCustomer SupportHi Dan,
It’s definitely possible.
You can add in a GB Headline block for this and set the dynamic value to retrieve post meta and place the slug of your ACF on the text provided. https://docs.generatepress.com/article/dynamic-data/#post-meta
September 7, 2021 at 6:16 am #1921587Dan
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
September 7, 2021 at 2:39 pm #1922204David
StaffCustomer SupportHi 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.September 7, 2021 at 3:20 pm #1922228Dan
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,
DanSeptember 7, 2021 at 5:36 pm #1922300David
StaffCustomer SupportYou 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. -
AuthorPosts
- You must be logged in to reply to this topic.