#40904 closed defect (bug) (invalid)
Cannot display meta value in REST API
Reported by: | conner_bw | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.7.5 |
Component: | REST API | Keywords: | |
Focuses: | Cc: |
Description
Steps to reproduce:
add_action( 'init', function() {
register_meta( 'post', 'zigzag', [ 'show_in_rest' => true ] );
} );
In WordPress multi-site, edit an existing post and add a a custom value for key name 'zigzag', save the post.
Go to: http://DOMAIN/SITE/wp-json/wp/v2/posts/ID
Expected: meta node has a value for zigzag
Actual: zigzag is empty.
Reference: scroll down to "Working with Meta"
https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/
Attachments (2)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Wow, i'm an idiot. Spelling mistake.
zizag != zigzag
Close bug.