Last active
January 27, 2016 10:00
-
-
Save agronom81/b63d8077ed89e501c3f3 to your computer and use it in GitHub Desktop.
get the_content with 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
// Setting the Post ID in a variable for which the content is required | |
$the_postid = 20; | |
$the_post_content = get_post($the_postid); | |
$content = $the_post_content->post_content; | |
$content = apply_filters('the_content', $content); | |
$content = str_replace(']]>', ']]>', $content); | |
// Print Content data or further use it as required | |
echo $content; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment