Home Forums Add-ons Repeater Field Repeater field FILE Reply To: Repeater field FILE

  • Hi Guys

    I have updated my code using the repeater field, see below

    However i can not get the actual file title to be a link and open the downloadable file.

    The url of the file diplays on the front but not as alink to the download

    Here is a link to my website: see the code at the bottom of the page

    any help please


    $attachment_id = get_field(‘downloads’);
    $url = wp_get_attachment_url( $attachment_id );
    $title = get_the_title( $attachment_id );

    // check if the repeater field has rows of data
    if( have_rows(‘downloads’) ):

    // loop through the rows of data
    while ( have_rows(‘downloads’) ) : the_row();

    <!– display a sub field value –>

    <?php the_sub_field(‘download1’); ?>

    “”<?php echo $title; ?>”

    <?php endwhile; else :
    // no rows found