Support

Account

Home Forums Add-ons Repeater Field How to show PDF's by title? Reply To: How to show PDF's by title?

  • 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