orderby=meta_value_num and users posts ERRORS
-
Hello everyone! Me again (?) lol
I’m facing two issues:
-I can’t make it work orderby=meta_value_num with my meta key. I have a custom webservice using “query_posts” default from WordPress like thing “query_posts(‘meta_key=post_views_count&category_name=mapas&orderby=meta_value_num&order=DESC&posts_per_page=-1’ . ‘&paged=’ . $paged);”
And I need to recreate the exactly same thing with WP REST API. There I’m using a custom meta field (“post_view_counts”) and I’m order DESC, orderby=meta_value_num to get the most view post first. Any help using this REST?
-Issue num 2: Now I can see the users information (I’ve comment the lines asking for access)… but I can’t see posts from each user.
The end point “https://mywebsite.com/wp-json/users/1/posts” is giving me “[{“code”:”json_no_route”,”message”:”No route was found matching the URL and request method”}]”
Any fix for that???
Thanks a lot! Hope I can fix this ASAP
- The topic ‘orderby=meta_value_num and users posts ERRORS’ is closed to new replies.