WordPress.org

Forums

WP REST API (WP API)
[resolved] Pages (5 posts)

  1. Peter Luit
    Member
    Posted 1 year ago #

    In the documentation I can read all about posts, comments, media and users. But nothing about pages. Am I missing the point of the working area of this JSON plugin? I would like to use this API as well for displaying a certain page in my iOS/Android apps. Any suggestions?

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

  2. Peter Luit
    Member
    Posted 1 year ago #

    well, after submutting this question, I ran into: http://wp-api.org/ and found the following:

    http://www.xxxx.com/wp-json/posts?type=page

    A filter to get a certain page can also be added, for example:

    http://www.xxxx.com/wp-json/posts?type=page&filters=searchitem

    In that way certain pages can be fetched. Any other suggestion are more than welcome.

  3. aryanduntley
    Member
    Posted 1 year ago #

    wp-json/posts/?type=page&filter[p]={THE_ID_OF_PAGE}

  4. Ryan McCue
    Member
    Plugin Author

    Posted 1 year ago #

    You should also be able to access pages at /wp-json/pages, and you can access individual pages at /wp-json/pages/<id> or /wp-json/pages/<slug>

    Hope that helps!

  5. Peter Luit
    Member
    Posted 1 year ago #

    Thanks, that is what I was looking for!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP REST API (WP API)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic