Skip to content

Commit 98e319c

Browse files
author
Salil Kothadia
committed
Update documentation about passing type param
1 parent 392cb60 commit 98e319c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ Want to get your site's posts, pages, articles, events?
99

1010
Use the Endpoint: '/wp-json/wp/v2/multiple-post-type'
1111

12-
List: `GET` request to `/wp-json/wp/v2/multiple-post-type`.
12+
List:
13+
14+
`GET` request to `/wp-json/wp/v2/multiple-post-type&type[]=post&type[]=page`
1315

1416
Get the page with slug "about-me":
1517

16-
`GET /wp-json/wp/v2/multiple-post-type?slug=about-me&type[]=posts&type[]=pages`
18+
`GET /wp-json/wp/v2/multiple-post-type?slug=about-me&type[]=post&type[]=page`
1719

1820
Search term "awesome":
1921

20-
`GET /wp-json/wp/v2/multiple-post-type?search=awesome&type[]=posts&type[]=pages&type[]=articles`
22+
`GET /wp-json/wp/v2/multiple-post-type?search=awesome&type[]=post&type[]=page&type[]=articles`
2123

2224

2325
## Credits

0 commit comments

Comments
 (0)