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.

echo get_post_field('post_content', $post_id);

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


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.

Leave a Reply