WP REST API returns incorrect data?

I’m trying to get a page from the API based on its page template however it seems to be returning incorrect data? so I’m unsure whether I am using the API correctly.

http://domain.dev/wp-json/wp/v2/pages?template=page-contact.php

Returns pages using different page templates?

Also if I was to query by page id, it brings back pages which are not the id of 20?

http://autosmart.dev/wp-json/wp/v2/pages?id=20

Can anyone advise how to get the API to work correctly and whether I am querying the data correctly?

Thanks

0

Leave a Comment