^_^ so true!
ROFL at that vid – “…I come from a time way back …. when computers were used for 2 things. You either go to the moon – or play pong. Nothing in between.”
Thanks for the lols at the end of my work day John, cheers!
Sh*t that is quite long. Longest loads I’m getting is about 15-25s on page with 10-15 flexible content rows each with a WYSIWYG, Image, Link, Repeaters etc – which shows I am impatient more than anything!
Most of the time savings I was able to achieve by posting the field group changes via AJAX instead of refreshing the whole page (and having to wait for the field groups and other DOM elements to be redrawn every time). Saving request take about 5-10s on average, so after loading the page for the first time, it’s a no-brainer.
I do agree with you though, you can’t be all things to all clients. If they want the flexibility of creating custom layouts and rows with lots of complex conditional logic happening, then the wait for a minute is more than a reasonable cross to bear for a fool-proof, fully formatted page on the front end.
Thanks for sharing your insights, it is always helpful to be able to benchmark along the way.
Hi John,
Do you have a rough idea on how long the page is taking to load for you with the delay setting enabled?
I must say that the load times are not significantly different in my case (using about 10 flexi layouts and conditional logic in most of them) – maybe the issues are unrelated? I have a feeling that the release candidate 5.5.X version was working better for me than the latest stable release?
Cheers, Scott.
Oops my bad, I was counting every element up to 5
http://debunc.com/maidus-repeater-test/
This works using the following code:
You can use an if statement as follows:
<?php
$i = 0;
if(have_rows(‘repeater_name){
while(have_rows(‘repeater_name’)){
the_row();
$i++;
if($i=1){
<div>
}
// output your normal data between here
if($i<=5){
</div>
}
}
}
?>
+1 to this request, long flexible content and repeater areas can really slow the admin page load down.
Hi Barrowr, if you update your code to
<?php if( have_rows('itinerary_day_details') ):?>
<table>
<!-- Header row for all cols in table -->
<tr>
<th>Date</th>
<th>Port</th>
<th>Arrival Time</th>
<th>Departure Date</th>
<th>Activity</th>
</tr>
<?php while ( have_rows('itinerary_day_details') ) : the_row(); ?>
<tr>
<td><?= the_sub_field('date'); ?></td>
<td><?= the_sub_field('port'); ?></td>
<td><?= the_sub_field('arrival_time'); ?></td>
<td><?= the_sub_field('departure_date'); ?></td>
<td><?= the_sub_field('activity'); ?></td>
</tr>
<?php endwhile; ?>
<?php else: ?>
<!-- if no rows are found add markup below -->
<?php endif;?>
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.