Support

Account

Home Forums Add-ons Gallery Field Display number of photos in a gallery field Reply To: Display number of photos in a gallery field

  • Hi @brianyerkes

    Sure. So, the get_field function will return an array containing all the images right? Therefor, you can target the first image like so:

    
    $images = $image[0];
    

    As for the count? There is a PHP function called count which will do this for you:

    
    echo count( $images );
    

    Easy

    Thanks
    E