Query WordPress (REST) posts by the order they appear on the admin
Asked Answered
A

1

0

I am using the Post Types Order plugin to re-order posts on WP Admin.

Is there a way to fetch WP REST API by that order?

/wp-json/wp/v2/posts?orderby ??

WP Rest Api docs only shows order by: date, id, include, title, slug

Abijah answered 29/6, 2016 at 13:13 Comment(0)
A
0

Just omit orderby from the query and it will do it:

/wp-json/wp/v2/posts?per_page=20&page=1
Abijah answered 29/6, 2016 at 13:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.