Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#40904 closed defect (bug) (invalid)

Cannot display meta value in REST API

Reported by: conner_bw's profile conner_bw Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.5
Component: REST API Keywords:
Focuses: Cc:


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"

Attachments (2)

meta1.PNG (50.3 KB) - added by conner_bw 7 years ago.
meta2.PNG (35.6 KB) - added by conner_bw 7 years ago.

Download all attachments as: .zip

Change History (4)

7 years ago

7 years ago

#1 @conner_bw
7 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Wow, i'm an idiot. Spelling mistake.

zizag != zigzag

Close bug.

#2 @swissspidy
7 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.