Sorting on multiple custom fields
-
Hi,
I’m creating a site for a football team, and am trying to create a league table where all the values are stored into custom fields.
When I’m displaying this on, I cannot find a way of sorting by 2 custom fields together (ie, if points are equal, sort by goal difference). I have followed though this article (https://codex.www.ads-software.com/Displaying_Posts_Using_a_Custom_Select_Query) but I can’t work out how to modify it to query/sort both.
Any suggestion’s welcome – my custom field name’s are ‘pts’ and ‘goal-diff’, and are stored in a custom post type ‘league-table’.
Thanks – Paul.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Sorting on multiple custom fields’ is closed to new replies.