Repeater field for simple list not working

Question

This is kind of weird. I’m just trying to make a simple list of clients using ACF repeater fields. I set up the field called Client and a subfield names The Client Name. It works fine in the WP backend, but it isn’t displaying at all on the front end. Here’s the code I’m using. Can anyone see what I’m missing?

                            <ul>
                                <?php
                                    // get clients
                                    if (have_rows('client')) : 
                                     while (have_rows('client')) : the_row();
                                        $client_name = get_sub_field('the_client_name');
                                        
                                 ?>
                                <li><?php echo $client_name; ?></li>  
                                <?php endwhile; ?>
                                <?php endif; ?>
                             </ul>

0
paulwk 6 months 2022-02-14T18:21:47-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse