title: ACF Repeatable Content Widget - WordPress
body: <p>I've created a Field group called 'Team Members' and set the field type as repeatable with three sub fields; Image, Position and Name. </p>
  
  <p>The rule for this group is to show within a custom widget I've created. When I drag the widget in the Appearance > Widgets area of WordPress I can see it is indeed there and can add members / images to my widget.</p>
  
  <p>Where I've hit a brick wall is trying to output this data on the front end through my widget template. </p>
  
  <p>This is my code: </p>
  
  <pre><code>   &lt;?php if( have_rows('team_members') ): ?&gt;
  
              &lt;ul class="slides"&gt;
  
              &lt;?php while( have_rows('team_members') ): the_row(); 
  
                // vars
                $image = get_sub_field('image');
                $content = get_sub_field('name');
                $link = get_sub_field('position');
  
                ?&gt;
  
                &lt;li class="slide"&gt;
  
                  &lt;?php if( $link ): ?&gt;
                    &lt;a href="&lt;?php echo $link; ?&gt;"&gt;
                  &lt;?php endif; ?&gt;
  
                    &lt;img src="&lt;?php echo $image['url']; ?&gt;" alt="&lt;?php echo $image['alt'] ?&gt;" /&gt;
  
                  &lt;?php if( $link ): ?&gt;
                    &lt;/a&gt;
                  &lt;?php endif; ?&gt;
  
                    &lt;?php echo $content; ?&gt;
  
                &lt;/li&gt;
  
              &lt;?php endwhile; ?&gt;
  
              &lt;/ul&gt;
  
            &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>Where am I going wrong?</p>