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’m doing a terrible job of explaining. I’m having no problems with viewing the data in the arrays and realize it’s an array and been pouring over google.
But how do I in my original code tell the ‘orderby’ to literally order the meta_value by like ‘$arr[0]’? Or is this not even possible? Currently the ‘orderby’ will not work because it’s an array, so want it to look at just the first value in the array to ‘orderby’.
Really appreciate your help, hopefully I made a little more sense this time.
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!
❓Ever wondered when and why ACF uses JSON instead of the database? Check out our summary of the most recent session of ACF Chat Friday for the answer, and make sure to register for the next session.
— Advanced Custom Fields (@wp_acf) February 23, 2023
👉 https://t.co/3UtvQbDwNmhttps://t.co/wfFEVcXVKc
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.