A cleaner call back which returns an array of ojbects in JSON with the post ID, title, content, name, image thumbnails (small,medium,large) only.
The custom endpoints examples-
- eg. your domain/wp-json/api/v1/posts
- eg. wp-json/api/v1/pages
- eg. /wp-json/api/v1/product
http://<your domain>/wp-json/api/v1/posts
Add your slug at the end -
- eg. your domain/wp-json/api/v1/posts/how-to-sell-online
http://<your domain>/wp-json/api/v1/posts/<slug-name>