Hi friendlywebperson
See ACF Block Preview Mode section in https://www.advancedcustomfields.com/blog/acf-5-12-released/ which mentions this issue and suggests a workaround.
I’m finding the same issue, and also when WordPress does its autosave. I’ve submitted a ticket about ACF 5.9.0 causing an update save on autosave.
Hi alexgordon25
Try removing the line align_text => true
Graham
You need to modify or add a file to your child theme to include the Field Group values in the output. For general information see
https://www.advancedcustomfields.com/resources/displaying-custom-field-values-in-your-theme/
and the Displaying Fields section of
https://www.advancedcustomfields.com/resources/adding-fields-posts/
There should be a link within the Upgrade notice which you can click to run the database updater.
I’d recommend backing up your database first.
I think you need to replace the while loop with
$rows = get_field('title' ); // get all the rows
$rand_row = $rows[ array_rand( $rows ) ]; // get a random row
and then use
$image = $rand_row['image' ];
$link = $rand_row['link' ];
to get the values.
Should
$wp_query_args['order']
not be
$wp_query_args['orderby']
?
Are the two setups identical?
There is an option in Field Groups to hide the Content Editor, could that have been set by mistake?
I’m not sure if I’ve understood your requirements, but it might be that you could add a radio button option to select the image styling.
You might, then, just need a single image field and set the output styling based on that selection. Or if the image fields have different requirements, eg, min size, then you could show / hide the image fields based on the radio button selection.
It would need to be an svg image, and is meant to be possible according to https://www.advancedcustomfields.com/resources/acf_register_block/ though I and others have not been able to get this to work, see https://support.advancedcustomfields.com/forums/topic/gutenberg-block-custom-svg-icon-not-displaying/
Would making the Field Group inactive in settings meet your requirements?
Try moving $class = ”; to before the second foreach loop.
As things are going wrong at row 127, there’s a 2^7 limit somewhere. Possibly your php settings, if so http://blog.syanaputra.com/2016/07/06/solving-acf-repeater-issue-not-saving-xx-rows/ offers a solution.
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.