WordPress.org

Support

Support » Plugins and Hacks » Basic Usage Questions

Basic Usage Questions

  • Some basic questions.

    1. Out of the box if writing(POST) disabled? Most of my use cases are read only. If not how can I make it read only?

    2. I noticed that the returns are based on post count under settings>reading, how can I return all posts if I want to? I tried:
    test.dev/wp-json/posts?posts_per_page=-1
    test.dev/wp-json/posts?nopaging=true

    Thanks,
    Eric

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • 1) Out of the box, valid authorization (correct user privileges) must be set before anyone accessing the API can successfully resolve any create/edit/put requests. The same goes with certain get requests.

    2) wp-json/posts/?type=myposttype&page=1&filter[posts_per_page]=1

    For all posts it would be -1

    wp-json/posts?filter[posts_per_page]=-1

    correct

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Basic Usage Questions’ is closed to new replies.