Forums
Home / Plugin: JSON API / Sort by meta_value_num?
(@daitoku)
10 years, 10 months ago
I have this working other than the sorting. Any help would be great.
http://site.dev/api/?json=core.get_recent_posts&post_type=contest&include=title,url,custom_fields&custom_fields=first_name,votes&count=-1&orderby=meta_value_num&meta_key=votes
http://wordpress.org/extend/plugins/json-api/
Tracked down the answer use get_posts not get_recent_posts
http://site.dev/api/?json=get_posts&post_type=contest&include=title,url,custom_fields&custom_fields=first_name,votes&count=-1&orderby=meta_value_num&meta_key=votes