Skip to content

Instantly share code, notes, and snippets.

@chriswagoner
Created January 26, 2022 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriswagoner/68124e3530b2f177096b01ed80eb6b94 to your computer and use it in GitHub Desktop.
Save chriswagoner/68124e3530b2f177096b01ed80eb6b94 to your computer and use it in GitHub Desktop.
FilterWP Sort by Custom Field (JSON)
// Here, we are getting all values so we're using a 'do not match' scenario
{
"meta_key": "field_slug",
"meta_value": 100,
"meta_type": "NUMERIC",
"meta_compare": "NOT LIKE",
"orderby": "meta_value",
"order": "DESC"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment