WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
Can I pass a post_type array to the api? (1 post)

  1. lisota
    Member
    Posted 8 months ago #

    I am trying to retrieve a query of two post types. By default, the api returns posts. I want posts, plus my custom post type called "events".

    Is it possible to pass an array to the post_type query parameter? If so, what is the syntax. If not how would I achieve combining two (or more) different post types in my query?

    On my site, I've changed the query parameters for the category archive page to include my custom post type in addition to posts. However, the JSON API apparently uses its own query or modifies those query parameters.

    http://wordpress.org/plugins/json-api/

Reply

You must log in to post.

About this Plugin

About this Topic