Support

Account

Home Forums Add-ons Repeater Field Ordering images in a lightbox

Solving

Ordering images in a lightbox

  • Hello, begenning with repeater field. I have an issue and don’t undersand why the field are not in the correct order. all the lightbox appears with the last images. Moving the order of the image in the backoffice don’t change a thing

    My code :

    <div id="presse">
        <?php query_posts('showposts=-1&post_type=revuedepresse&order=ASC'); ?>
        <?php while (have_posts()) : the_post(); ?>
        <ul>
        <li>
        <?php while(the_repeater_field('extrait')): ?>   
        <a class="fancybox" href="<?php the_sub_field('image'); ?>" rel="<?php the_sub_field('lightbox'); ?>" >
        <?php endwhile;?>
        <img src="<?php the_field('parution'); ?>" alt="" /></a>
        </li>
        </ul>
        <?php endwhile;?>   
        <?php wp_reset_query(); ?>
    </div> <!-- fin de contenu presse -->
  • Hi @rickky

    Looking at the source code generated, are the img elements in the correct order?

  • I look in the code source page and the order seems right :

    <ul>
    <li>
    <a class="fancybox" href="http://localhost:8888/moyat/wp-content/uploads/2013/07/MM01.jpg" rel="marianne" >
    <a class="fancybox" href="http://localhost:8888/moyat/wp-content/uploads/2013/07/MM02.jpg" rel="marianne" >
    <img src="http://localhost:8888/moyat/wp-content/uploads/2013/07/marianne_maion.png" alt="" /></a>
    </li>
    </ul>
    
  • Hi @rickky

    If the order is correct in your source code, then we can both agree that ACF is doing it’s job correctly.

    The problem must lie with the JS that is creating the popupbox. Perhaps there is some sort of rand setting?

    I would jump on google and find any forum talking about this issue as it is not specific to ACF.

    Thanks
    E

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Ordering images in a lightbox’ is closed to new replies.