Home › Forums › General Issues › How to display highest number value in post field by author name? › Reply To: How to display highest number value in post field by author name?
Thanks for the screenshots. To achieve the 3 questions above, you will need to add a field to the user. This field will contain the ‘reviews’ number.
For now, you can ask your editors to manually edit this number when they post a new review (edit profile, update custom field and save profile). You could also write some code to do this automatically, but lets talk about that later (after you have achieved 1,2,3 above).
With each user now containing a custom field for the ‘reviews’ number, you can use the WP_User_Query to query the users and display them in a list.
You can also output the user custom field (checkout the docs for more info on users) and sort them based on the custom field value based on teh custom field value!
This should solve all your problems!
basically, it won’t be possible to achieve the above with your current data setup and the user custom field is needed.
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!