Support » Plugin: JSON API » Can I pass a post_type array to the api?

  • lisota


    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.

  • The topic ‘Can I pass a post_type array to the api?’ is closed to new replies.