Support

Account

Forum Replies Created

  • Hey there!
    Thanks massively for the help, I worked it all out now.

    If this helps, here is my code for anyone else 🙂

    Field name is ‘Location’
    There are a lot of location stored as an array. To display the first one from the array (if there are multiple values) if just one value display that…

    if(get_field('location') == "location");
     $values = get_field('location');
                    if ( is_array($values) ) {
                        echo $values[0];
                    } else {
                    echo "$value";
                    }
    

    Thanks again! ]

  • Hey there linkhousemedia, many thanks for your speedy reply! I’ll have a look now and post back.

    Cheers

Viewing 2 posts - 1 through 2 (of 2 total)