Support

Account

Forum Replies Created

  • Hey elliot,

    Thanks for your input.

    I changed the return format to ‘file ID’ and it works perfect.

  • Sorry, thought I used the code button. I use the file object setting as the return field.

    if(get_field('pdf_download_repeater'))
    {
    	echo '<div class="widget"><h3 class="widgettitle">Downloads</h3><ul>';
    						
    while(has_sub_field('pdf_download_repeater'))
     {
     $attachment_id = get_sub_field('pdf_download_repeater');
     $url = wp_get_attachment_url( $attachment_id );
     $title = get_the_title( $attachment_id );
    							
     echo '<li><a target="_blank" class="download_pdf" href="' . $url . '">' . $title . '</a></li>';
     }
    					 
     echo '</ul></div>';
    }

    I’ll try the debugging right now

Viewing 2 posts - 1 through 2 (of 2 total)