Get WP Post Content By Post ID


You can use the get_post_field() function to get any of the wp_posts column fields. For example, get_post_field function retrieve the data from a post field based on Post ID.

[php]
echo get_post_field(‘post_content’, $post_id);
[/php]

Examples of the get_post_field function will be, ‘post_type’, ‘post_status’, ‘post_content’, etc. and check the following reference page.

Reference:

You may also be interested in our other articles on remove feeds form wordpress, allow more tags in comments, disable auto generated paragraph tags and limit length of ‘the_excerpt’ in WP.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *