Sort Custom Field Values by Meta Value (Character or Numeric)
From IThemes Codex
Revision as of 15:48, July 22, 2013 by Elise
- Custom Field values can be sorted by meta value (character or numeric).
- Only ONE meta item can be used to sort at one time.
- Using multiple meta items will assume you would like an advanced meta query, and sorting will be ignored in such a case. This is a WordPress limitation.
- Sort Custom Field Values via the following steps (assuming you already have several posts with the same custom field):
- 1 : Change the Order By parameter to either "Meta Value" or "Numeric Meta Value".
- 2 : Go to Post Meta Parameters and click "Add Meta".
- 3 : Set the Meta Key and Meta Values you would like to search for and sort by.
- 4 : Save the query.
- 5 : Assign the query to a post or section and observe the results.