Support

Account

Home Forums ACF PRO ACF file query returning null or a number Reply To: ACF file query returning null or a number

  • In your loop you must supply the post ID to get fields from the specific post

    
    foreach ($my_posts as $p) {
      $file = get_field('link', $p->ID);
      ...
    

    get_post_meta() returns an number because ACF only stores the ID of the file attachment.