Skip to content

Instantly share code, notes, and snippets.

@nirendra
Created November 27, 2013 23:23
Show Gist options
  • Save nirendra/7684803 to your computer and use it in GitHub Desktop.
Save nirendra/7684803 to your computer and use it in GitHub Desktop.
Get page content based on id
function webspec_get_content($my_id){
$post_id_5369 = get_post($my_id);
$content = $post_id_5369->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment