This seems to be fixed in 6.1.4
I’ve found the cause, when Ultimate member is activated my backend fields lose their content, unfortunately my site is relying on Ultimate member
I’ve just started having this issue too, its affecting some of my fields like accordions and carousels, they were working fine a few days ago
EDIT: I meant to say they were working when registered as php not json
Hi sorry to say but I think its highly unlikely you can just convert a website to a WordPress site with just a plugin, it will need rebuilding
Sorry misread your question, you want it showing in backend not just front end, ignore my answer!
if ($(".slide-carousel").length) {
var slidesliders = document.querySelectorAll('.splide.slide-carousel');
for (var i = 0; i < slidesliders.length; i++) {
var slideslider = new Splide(slidesliders[i], {
type: 'loop',
perPage: 3,
updateOnMove: true,
gap: '4rem',
padding:'4rem',
autoHeight: true,
focus: 'center',
autoplay: false,
rewind: true,
arrows: true,
});
slideslider.mount()
}
}
Hi thanks for the fast reply
Is there any way to count the items in a repeater but to use that value before the while loop?
I am using it with foundation block grid and want to set the number of columns to the number of repeater items instead of hardcoding it:
<?php
// REPEATER NAME
if( have_rows('grid') ):
?>
<div class="grid-x grid-margin-x small-up-1 medium-up-3 large-up-3" data-equalizer>
<?php // REPEATER ROW NAME
while ( have_rows('grid') ) : the_row(); ?>
<!-- BLOCK GRID -->
<?php
$grid_image = get_sub_field('grid_image');
$caption_header = get_sub_field('caption_header');
$caption_content = get_sub_field('caption_content');
$small_size = 'square-small';
$medium_size = 'square-medium';
$small = $grid_image['sizes'][$small_size];
$medium = $grid_image['sizes'][$medium_size];
?>
<div class="cell">
<h5 data-equalizer-watch><?php echo $caption_header; ?></h5>
<img data-interchange="[<?php echo $small; ?>, small], [<?php echo $medium; ?>, medium], [<?php echo $medium; ?>, large], [<?php echo $medium; ?>, xlarge]" alt="<?php echo $grid_image['alt'] ?>" />
<?php echo $caption_content; ?>
</div>
<?php
endwhile; ?>
</div>
<?php endif; ?>
ignore me my previous code seems to be working now!
I’m still not getting anything, though I just tried removing the if statements from your code just to check, and it outputs all the repeater row, I don’t know if that helps narrow down where the problem is
just one
Yes my code is below
<?php // displaying the values
$selections = get_field('service_select');
// this is assuming that the select field returns an array of selected values
if (!empty($selections)) {
if (have_rows('services', 'options')) {
while (have_rows('services', 'options')) {
the_row();
$title = get_sub_field('service_title');
$icon = get_sub_field('service_icon');
$title = get_sub_field('service_title');
$teaser = get_sub_field('service_teaser');
$description = get_sub_field('service_description');
$link = get_sub_field('service_link');
if (in_array($title, $selections)) {
// get other sub fields from the repeater and display here ?>
<div class="callout" data-equalizer-watch="callout">
<img src="<?php echo $icon['url']; ?>" alt="<?php echo $icon['alt'] ?>" />
<h5 class="text-center"><?php echo $title ?></h5>
<p class="text-center"><?php echo $teaser ?></p>
</div>
<?php } // end if selection is selected
} // end while have rows
} // end if get field
} // end if !empty
?>
Hi again, I managed to get the select field to dynamically populate, but the I’m not getting and fields to display on the page
Thanks John
Could you give any more detail on the second option, I tried following the examples but am struggling!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.