Created
January 31, 2019 20:15
-
-
Save httpstersk/a44d68d0aa2321d505b0466e6b560261 to your computer and use it in GitHub Desktop.
➊➑ Retrieve the details of a specific post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const POST_ID = 25; | |
const { select } = wp.data; | |
const { getEntityRecords } = select( 'core' ); | |
const [ postDetails ] = getEntityRecords( 'postType', 'post', { include: POST_ID } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment