the preview displays the content of the template that renders the block. In your template, the first element displayed is the image. So the preview shows the image but in realty that’s not the image which is in your attribute “gutenberg_preview”. It’s just the image in your template.
to verify my theory, could you remove the url from your image and see if it changes anything.
Like that :
'example' => array(
'attributes' => array(
'mode' => 'preview',
'data' => array(
'gutenberg_preview' => '',
),
)
)
I think that your preview will not change
But if your remove the image in your template, your preview will change
and what is the code in your template that renders the block ?
The image is at the top of this template ?
I understand. Thanks for taking time to respond to me. And thank you very much for this quick response :))
@phildesigns what this attribute “gutenberg_preview” ?
Have you define this attribute somewhere ?
Thanks for your response @hube2
Just to be clear :
“block” + “is equal to” + “name of my block”
It is not a custom code, it is a location rules provided by ACF.
Hi @hube2 I use this two conditions :
“block” + “is equal to” + “name of my block”
AND
“Page Type” + “is not equal to” + “Parent Page (has children)”
but my block also appears in parent pages with children. Do you know this problem ? Or have you a solution ? Thank you 🙂
@anybodesign je vois que tu as créé une catégorie de blocks. Comment fais-tu pour qu’elle s’affiche en premier, et même avant la catégorie “les plus utilisés”, s’il te plait ?
I see that you have created a category of blocks. How do you make it appear first, and even before the “most used” category, please?
hello, have you resolved this problem ?
hello, have you resolved this problem ?
Thanks John.
The big problem is : how can I target a layout in particular ?
Imagine : I have a flexible content with two layouts “big team” and “little team”.
I need to update the edit/save all fields of the layout “little team”. How can I target only this layout and its fields ?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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.