File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 22
33Extension of wp/v2/posts api to allow query multiple post types
44
5+
56## About
67
7- Want to get your site's posts, pages, articles, events/?
8- Endpoint is '/wp-json/wp/v2/multiple-post-type'
9- ` GET ` request to ` /wp-json/wp/v2/multiple-post-type ` .
10- Get the page with slug "about-me"? ` GET /wp-json/wp/v2/multiple-post-type?slug=about-me ` .
11- search term "awesome"? ` GET /wp-json/wp/v2/multiple-post-type?search=awesome ` .
8+ Want to get your site's posts, pages, articles, events?
9+
10+ Use the Endpoint: '/wp-json/wp/v2/multiple-post-type'
11+
12+ List: ` GET ` request to ` /wp-json/wp/v2/multiple-post-type ` .
13+
14+ Get the page with slug "about-me": ` GET /wp-json/wp/v2/multiple-post-type?slug=about-me ` .
15+
16+ Search term "awesome": ` GET /wp-json/wp/v2/multiple-post-type?search=awesome ` .
17+
1218
1319## Credits
1420
1521Build using the code shared by Ruben Vreeken, (https://github.com/Rayraz )
1622on stackoverflow (http://stackoverflow.com/questions/38059805/query-multiple-post-types-using-wp-rest-api-v2-wordpress )
1723
24+
1825## License
1926
2027[ GPLv3+] ( http://www.gnu.org/licenses/gpl-3.0.html )
You can’t perform that action at this time.
0 commit comments