Post Content by ID

echo apply_filters('the_content', get_post_field('post_content', $post_id));

Sourced here.

Update – July 28, 2015

This method can also be used to retrieve data from custom fields when working with plugins like Advanced Custom Fields:

echo apply_filters('widget_content', get_post_field('widget_content', $post->ID));

Leave a Reply

Posted in php
katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.