WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
Add custom fields to get_page (3 posts)

  1. davidmh
    Member
    Posted 3 years ago #

    Hi everyone, I've noticed that there's the possibility to retrieve the custom fields with this plugin, but I'm completely in the dark when it comes to include that feature.

    Can some one help me out?

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

  2. mlcy44
    Member
    Posted 3 years ago #

    i am trying to get that method to work, but it didn't take the page slug that i passed in. does it work for you?

  3. dphiffer
    Member
    Plugin Author

    Posted 3 years ago #

    Hi davidmh,

    Sorry for the slow reply. Did you look at the API documentation?

    The query parameter to include in your request is custom_fields which should be set to a comma-separated list of the fields you want to include.

    Like this:
    http://example.org/?json=get_page&slug=foo&custom_fields=custom1,custom2

    Best,
    -Dan

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags