BACK TO DIRECTORY

WP Rest Api V2 Multiple PostTypes

by salilkothadia

0.0
(0 ratings)

Multiple Content type Query API for WordPress Rest Api V2

Extension of wp/v2/posts api to allow query multiple post types

About

Want to get your site’s posts, pages, articles, events?

Use the Endpoint: ‘/wp-json/wp/v2/multiple-post-type’

List:

GET request to `/wp-json/wp/v2/multiple-post-type?&type[]=post&type[]=page`

Get the page with slug “about-me”:

GET /wp-json/wp/v2/multiple-post-type?slug=about-me&type[]=post&type[]=page

Search term “awesome”:

GET /wp-json/wp/v2/multiple-post-type?search=awesome&type[]=post&type[]=page&type[]=articles<h3>Credits</h3>

Build using the code shared by Ruben Vreeken, (https://github.com/Rayraz)
on stackoverflow (http://stackoverflow.com/questions/38059805/query-multiple-post-types-using-wp-rest-api-v2-wordpress)

License

GPLv3

Plugin Details

Active Installs
100
Total Downloads
3,638
Version
1.0.3
Requires WP
4.8
Requires PHP
5.2.4
Tested Up To
4.9.31
Added
2017-02-27
Last Updated
2018-07-12 2:37pm GMT

Ratings

5
0
4
0
3
0
2
0
1
0