WordPress.org

Forums

WP REST API (WP API)
[resolved] And Now a Question (8 posts)

  1. devinfd
    Member
    Posted 1 year ago #

    I queried a post and got back all that data on that post except for the custom fields. Is it possible to retrieve them as well?

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

  2. SergeyPF
    Member
    Posted 1 year ago #

    Works fine for me, under meta section. If no custom fields are there, meta will be empty.

  3. devinfd
    Member
    Posted 1 year ago #

    Actually I think the problem is that I am using the ACF Plugin (http://wordpress.org/plugins/advanced-custom-fields/) and, I assume, those values are not stored as regular custom fields.

  4. spectrus
    Member
    Posted 1 year ago #

    They are stored alongside the usual custom fields, inside wp_postmeta table. Only ACF adds an extra key-value pair to its fields:

    meta_id    post_id    meta_key        meta_value
        1607       XX         testimonial     YY
        1608       XX         _testimonial    field_5177d30141f17
  5. devinfd
    Member
    Posted 1 year ago #

    Interesting. Well that is good to know, but even still my ACF values are not in the JSON object returned. I'll keep investigating.

  6. Ryan McCue
    Member
    Plugin Author

    Posted 1 year ago #

    This may be related to issue #10, can you confirm it's fixed in 0.7?

  7. devinfd
    Member
    Posted 1 year ago #

    Confirmed! The issue is resolved. Thanks for the update.

  8. devinfd
    Member
    Posted 1 year ago #

    resolved

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