{"id":72528,"date":"2017-08-22T16:07:02","date_gmt":"2017-08-22T16:07:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/rest-api-multiple-post-types\/"},"modified":"2017-08-22T16:07:02","modified_gmt":"2017-08-22T16:07:02","slug":"rest-api-multiple-post-types","status":"publish","type":"plugin","link":"https:\/\/scn.wordpress.org\/plugins\/rest-api-multiple-post-types\/","author":9688619,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.1.0","stable_tag":"0.1.0","tested":"4.8.28","requires":"4.7","requires_php":"","requires_plugins":"","header_name":"REST API Multiple Post Types","header_author":"Caldera Labs","header_description":"Query for multiple post types on the default post route","assets_banners_color":"","last_updated":"2017-08-22 16:07:02","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/calderalabs.org","header_author_uri":"http:\/\/CalderaLabs.org","rating":0,"author_block_rating":0,"active_installs":50,"downloads":4330,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.0"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"A cool screenshot of some fancy JSONs."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[15470,15464,23853,2300],"plugin_category":[],"plugin_contributors":[78444],"plugin_business_model":[],"class_list":["post-72528","plugin","type-plugin","status-publish","hentry","plugin_tags-caldera","plugin_tags-hi-roy","plugin_tags-rest-api","plugin_tags-wp-api","plugin_contributors-shelob9","plugin_committers-shelob9"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/rest-api-multiple-post-types.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Any post type that works with the WordPress REST API (show_in_rest must be true when declaring post type) will be queryable with \/wp\/v2\/posts<\/p>\n\n<p>Example Queries<\/p>\n\n<ul>\n<li>GET wp\/v2\/posts?type=roy<\/li>\n<li><p>GET wp\/v2\/posts?type[]=roy&amp;type[]=mike<\/p>\n\n<p>A free plugin by <a href=\"http:\/\/calderalabs.org?utm_source=dotOrg&amp;utm_medium=plugins&amp;utm_campaign=rest-api-multiple-post-types\">Caldera Labs<\/a> the makers of <a href=\"https:\/\/calderaforms.com?utm_source=dotOrg&amp;utm_medium=plugins&amp;utm_campaign=rest-api-multiple-post-types\">Caldera Forms<\/a> a drag and drop responsive form builder.<\/p><\/li>\n<\/ul>\n\n<!--section=installation-->\n<p>This section describes how to install the plugin and get it working.<\/p>\n\n<p>e.g.<\/p>\n\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/plugin-name<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<li>Use the Settings-&gt;Plugin Name screen to configure the plugin<\/li>\n<li>(Make your instructions match the desired user flow for activating and installing your plugin. Include any steps that might be needed for explanatory purposes)<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>A question that someone might have<\/dt>\n<dd><p>An answer to that question.<\/p><\/dd>\n<dt>Why Isn't My Post Type Showing Up?<\/dt>\n<dd><p>It must be declared with show_in_rest = true.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.1.0<\/h4>\n\n<p>First release.<\/p>","raw_excerpt":"Query multiple post types using \/wp\/v2\/posts","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/72528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=72528"}],"author":[{"embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/shelob9"}],"wp:attachment":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=72528"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=72528"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=72528"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=72528"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=72528"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=72528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}