Support

Account

Home Forums General Issues How to echo custom field from media attachment Reply To: How to echo custom field from media attachment

  • 
    $attachments = get_attached_media('');
    if ($attachments) {
      foreach ($attachments as $attachment) {
        echo get_field('custom-field-name', $attachment->ID),'<br />';
      }
    }