Home Forums Add-ons Repeater Field PDF Attachment as Link Reply To: PDF Attachment as Link

  • Hi @hartu

    I’m not sure which one is the file custom field, so forgive me if I’m wrong (please keep in mind that you need to create a new file custom field in your repeater field). If the file custom field is ‘ort’, you need to do it like this:

    // Ort aus Feld laden
    $ort = get_sub_field('ort');
    //Here goes your Code? 
        if ( $ort ):
        <a href="<?php echo $ort['url']; ?>"><?php the_sub_field('bezeichnung'); ?></a>
        <? endif;

    Also, you need to set the return value of your file custom field to “File Array”. I’ve attached a screenshot for your reference.

    Hope this helps 🙂