Created
February 21, 2014 11:20
-
-
Save ihorvorotnov/9132664 to your computer and use it in GitHub Desktop.
WordPress: get post content by ID
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
/** | |
* You often need to get the content or title from a specific post. | |
* Sometimes, using a custom loop is the better option, but when you only need | |
* to get information from a specific post, there’s a better option | |
*/ | |
echo get_post_field('post_content', $post_id); |
Perfect and simple :) thank you !!!
Perfect solution. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're a hero, thanks!