ricardocrab
Forum Replies Created
Viewing 1 replies (of 1 total)
-
The previous code had an error in it. Now I’m no longer getting an internal server error, but the ALM keeps on loading content past $alm_loop_count = 8 and $alm_page_count = 2:
<?php $alm_loop_count = 0; $alm_page_count = 0; if (have_rows('work_gallery')): ?> <?php while (have_rows('work_gallery')): the_row(); ?> <div class="col-xs-12 col-sm-6 gallery-item tag-all <?php $tags = get_sub_field('tags'); if( $tags ) { foreach($tags as $t) { $t = get_category($t); echo 'tag-'.$t->name.' '; } } ?>" style="background-image:url('<?php echo the_sub_field('image'); ?>');"> <?php $alm_loop_count++; if ($alm_loop_count > 8) { $alm_page_count++; $alm_loop_count = 0; } var_dump($alm_loop_count); var_dump($alm_page_count); ?> <div class="client-logo"> <img class="img-responsive" src="<?php echo bloginfo('template_url');?>/images/<?php echo the_sub_field('client_logo');?>" alt="<?php echo the_sub_field('client'); ?>"> </div> <div class="tags"> <ul> <?php $tags = get_sub_field('tags'); if( $tags ) { foreach($tags as $t) { $t = get_category($t); echo '<li>'.$t->name.'</li>'; } } ?> </ul> </div> <h2> <?php echo the_sub_field('title'); ?> </h2> <a href="<?php echo the_sub_field('link'); ?>" class="btn btn-reverse">View Work</a> </div> <?php endwhile; ?> <?php endif; ?>
Viewing 1 replies (of 1 total)