Support

Account

Home Forums Add-ons Repeater Field How to make File repeater Reply To: How to make File repeater

  • Some of the basic stuff like this is explained in the file field documentation http://www.advancedcustomfields.com/resources/file/

    If you want to see everything that’s returned for the file try doing the following in your code where you’re getting the value

    
    $file = get_sub_field('file_upload');
    echo '<pre>'; print_r($file); echo '</pre>';
    

    Here is how you show the file name

    
    <?php 
    if (have_rows('file_repeater')) {
      while (have_rows('file_repeater')) {
        the_row();
        $file = get_sub_field('file_upload');
        ?>
    	<br>
    
    		<img style="width:18px; height:10px;" src="http://www.subshunter.com/wp-content/uploads/2016/01/br.png" />
    		<span><?php echo $title; ?></span>
          	<a href="<?php echo $file['url']; ?>"><?php echo $file['filename']</a>
    		
        <?php 
      }
    }
    ?>