WordPress.org

Forums

JSON API
Include / Exclude Query Params (1 post)

  1. samhibberd
    Member
    Posted 10 months ago #

    I am writing a custom controller but cant get the include / exclude params to work, I have tried to use various field name formats but it just wont play ball:

    $query = array(
          'posts_per_page' => 10,
          'cat' => '71,-151,-152',
          'include' => 'post_title,post_content'
        );
    
        $events = $json_api->introspector->get_posts($query);

    Any thoughts??

    Thanks,

    Sam

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

Reply

You must log in to post.

About this Plugin

About this Topic