Forums
Forums / Plugin: JSON API / Sort by meta_value_num?
(@daitoku)
12 years, 9 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
The topic ‘Sort by meta_value_num?’ is closed to new replies.