Support

Account

Home Forums General Issues need to select first item in meta_value array to sortby Reply To: need to select first item in meta_value array to sortby

  • I really appreciate all your help! Sorry I’m not doing the best job explaining or understanding.

    When I echo the results of ‘application_type’ it is printing out “Array”, unless I do $arr[0] then it will print out like “Bathtub”.

    $arr = get_field('application_type', $post->ID); echo $arr;

    I want my orderby to use just the first item in the Array, currently it won’t even work period, even if just one value in ‘application_type’. I am allowing the admin to select checkboxes, but tried allowing them to select just one value from a drop down and the orderby works great.

    Hopefully I am making a little more sense? Thank you so much for your help!