Links in a while loop only giving me last href value instead of all of them

Im busy with a project where Im making use of the acf repeater field and I have to loop through four different href. The links are being pulled from the db but no matter which option i click only the last link opens.

<?php if( have_rows('slider_splash') ):?>
                <?php while ( have_rows('slider_splash') ) : the_row();?>
                    <li>
                        <?php $str = get_sub_field('text_slider');
                            $str = strtoupper($str);
                            echo "<h2 class='splash-type'>$str<h2>"
                         ?>

                    <?php 
                    $image = get_sub_field('image_slider');
                        if( !empty($image) ): ?>
                        <img src="<?php echo $image['url']; ?>" 
                          alt="<?php echo $image['alt']; ?>" />
                        <div >

                            <p><?php the_sub_field('footer_text');?></p>
                            <a href="<?php the_sub_field('link_type');?>">
                                <?php
                                $str = get_sub_field('description_link');
                                $str = strtoupper($str);
                                echo "$str" 
                                ?>
                               </a>
                            <div class="clear-float"></div>
                        </div>

                    <?php endif; ?>

                    </li>
                <?php endwhile;
                else :  // no rows found
                endif;?>

Related posts

Leave a Reply