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!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.