Home Forums Feature Requests Ability to query ACF fields from a block if the block is only allowed once


Ability to query ACF fields from a block if the block is only allowed once

  • One of the most major drawbacks of switching over to using the Gutenberg editor and ACF Blocks is the fact that you can’t simply use get_field() and pass in the ID of the post to retrieve the fields.

    I’m wondering if the block is only allowed once per page, would it be within the realm of possibility to be able to store the fields as regular post meta so they can be retrieved on other pages?

    I have a case where I’d like to have an ‘intro’ block for a CPT to be allowed only once per page and using block templates I will add it to the top of the post. I would like to pull out a couple of basic text fields and the image used in this block to create a preview of this post on other pages. I could always create these fields as a regular field group on the post, but this is not the most elegant solution as the fields are displayed below the editor, and the client doesn’t get a preview of what their Intro section will look like.

    My struggle is essentially that I don’t find it very intuitive to have to look for additional custom fields below the Gutenberg editor so I’m trying to find a balance between a great experience editing the post and having the flexibility to manipulate the data

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.