Have to say that I agree with Willy. I understand a lot of good work goes into the development of ACF, and I;m sure the intent is good, but I’m finding the recent UI updates quite frustrating. When working with flexible content fields, the sub fields can be quite unresponsive to clicks and ‘janky’, until suddenly the the clicks are registered and the fields open and close quickly to catch up.
@willy-m Did you ever contact the devs?
Thanks John, I’ll try contacting them through the WP support forums.
Please ignore / delete this post, my code was wrong. Mea culpa.
I fixed it. For anyone else struggling, ths worked for me:
<?php
if( have_rows('text_area') ) :
while ( have_rows('text_area') ) : the_row();
if( get_row_layout() == 'text' ) :
if(get_sub_field('columns') == "1") : ?>
<div>
<?php the_sub_field('first_column_text') ;?>
</div>
<?php elseif(get_sub_field('columns') == "2") : ?>
<div>
<?php the_sub_field('first_column_text'); ?>
<?php the_sub_field('second_column_text'); ?>
</div>
<?php endif;
endif; //get_row_layout
endwhile; //have_rows
endif; //have_rows
?>
I dont have this issue anymore. Not sure what was happening but I dropped out, ran gulp && gulp watch again and things sorted themselves out.
Thanks to James in support for the fix below:
<?php $image_ids = get_field('gallery', false, false);
$shortcode = '[gallery link="file" ids="' . implode(',', $image_ids) . '"]';
echo do_shortcode( $shortcode ); ?>
Now works like a charm 🙂
Hmm, I’m not sure that helps me. I tried swapping out $image_ids for $images etc but got the same results. I shouldn’t need to alter any HTML. I’ve integrated fancybox into the WP Gallery via my functions.php file, so on normal pages the WP Gallery acts like fancybox right out of the box.
It’s only when WP Gallery is called using this add-on that clicking a thumbnail opens the attachment page rather than the media file in a lightbox.
Thanks for your help anyway 🙂 I’ll keep looking…
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.