- This topic has 11 replies, 4 voices, and was last updated 4 years ago by
David.
-
AuthorPosts
-
July 1, 2021 at 11:28 pm #1841758
Jordi
Hi, I created some fields with ACF and assigned them to “Options page”. Now I want to create a Hero with generatebloks. Is it possible to get ACF fields to view them in Hero?
Thanks!!
July 1, 2021 at 11:53 pm #1841771Elvin
StaffCustomer SupportHi Jordi,
It should be possible with GP Premium 2.0’s dynamic settings on Block Element – Page Hero.
Here’s an example: (Setting dynamic background image taken from ACF field value)
https://share.getcloudapp.com/yAurJB0OAll GenerateBlocks have dynamic settings within Block Element. 😀 You can set whatever field you wish to fetch on this setting.
July 2, 2021 at 12:26 am #1841798Jordi
Hi, thanks for the reply.
Yes, but if I assign the ACFs to the “Options page”, how do I display them?


Thanks!
July 2, 2021 at 12:34 am #1841802Elvin
StaffCustomer SupportYes those settings are correct.
Just make sure the field type is set to “Image” and actually returns an Image URL.
https://share.getcloudapp.com/E0uAXe7mJuly 2, 2021 at 1:47 am #1841851Jordi
Yes, but it still doesn’t show the image.

July 2, 2021 at 3:43 am #1841945David
StaffCustomer SupportHi there,
can you add a background image to the Container Block within the post editor – there has to be a background attached for the Dynamic Background to work.
July 2, 2021 at 7:11 am #1842130Jordi
Yes, I have already added a background image but this still does not show the dynamic image.

—————–

—————–

—————–

—————–

In this space there should be the dynamic background image.July 2, 2021 at 7:39 am #1842154David
StaffCustomer SupportCan you share a link to where i can see the block being output ?
July 3, 2021 at 2:41 pm #1843557Jordi
Okay, I’ll send you it.
July 4, 2021 at 5:16 am #1843836David
StaffCustomer SupportI am not sure – but i don’t think this will work from an ACF options page, according to the ACF docs:
https://www.advancedcustomfields.com/resources/get-values-from-an-options-page/
It requires the equivalent of a $post_id to be part of the get_field request.
The GB Block element would expect the Custom Field to exist on the actual page or post.April 29, 2022 at 10:56 am #2204266Dan
Hi,
Following up on this.
Is there any possibility to call a field from an ACF options page.
For example, creating a footer element with social icons (each with a link), I would like the links to be dynamic and populated from the ACF options page, and not statically inserted to each icon.Thanks
DanApril 30, 2022 at 2:42 am #2204628David
StaffCustomer SupportHi Dan
I responded here:
https://generatepress.com/forums/topic/acf-options-field-for-off-canvas-menu/#post-2204627Short answer – no using a GP Dynamic data setting but yes using ACF shortcode/block
-
AuthorPosts
- You must be logged in to reply to this topic.