I am working with Advanced Custom Fields (repeater field) in order to create a WordPress slideshow with Flexslider with:

image, head, copytext

<div class="flexslider">
<ul class="slides">

<?php if( have_rows('slider') ): ?>
<?php while( have_rows('slider') ): the_row(); 

        $image = get_sub_field('bg_image');
        $caption = get_sub_field('slidertext');
        $head = get_sub_field('slider_head');

        <img src="<?php echo $image; ?>"/>
        <div class="headline"><h3><?php echo $head; ?></h3></div>
        <?php echo $caption; ?>

    <?php endwhile; ?>


<?php endif; ?>

Everything’s working OK, but I am somehow lost. I want to put the head and copytext over the image slides, but it’s inside a “li”, so styling it with CSS (position: absolute) seems pretty hard, isn’t it?

Is it possible to start the query once (only for the slides) and then restart it only for the head and copytext so that I can have the head and copy wrapped in a div for better styling?

Thank you.

Read more here: Is this WordPress query possible with advanced custom fields?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: