I just wanted to get WordPress content by post id. I found the following three ways to get WordPress content by post id. (All the following ways I found on this site.)
$content_post = get_post($my_postid); $content = $content_post->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content);
$content=apply_filters('the_content', get_post_field('post_content', $my_postid));
What is the best / efficient way from above there methods and why?