0

I am pulling in some data via the Rest API:

https://legalsecurityforum.com/wp-json/wp/v2/speaker?include[]=3116&include[]=3249&include[]=3170&include[]=3416&include[]=3181&include[]=1857&include[]=3563

The data loads fine, but the order is out of whack.

I was expecting the first result to be ID '3116' as that's the first included id in my URL.

How do I pull in data orderd by the URL id?

enter image description here

1

Add order=include to your GET request.

See the docs here:

https://developer.wordpress.org/rest-api/reference/posts/#arguments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.