Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3694

WP-API GET multiple pages by id

$
0
0

I want to get page id 12 and 14 using WP-API.
Normally, if I wanted only 1 page I would write

'/wp-json/pages?filter[p]=14'

or

'/wp-json/pages?filter[page_id]=14'

If I wanted pages by author id 1 and 2, I'd write

'/wp-json/pages?filter[author]=1,2'



These all work but trying to get page 12 and 14 don't.
I tried p, page_id, post__in

I'd appreciate if anyone could shed some light. Thanks

PS.: using version 1.x of the WP-API


Viewing all articles
Browse latest Browse all 3694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>