Skip to content

Instantly share code, notes, and snippets.

@kier0
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save kier0/558aae3cd882666a0aaf to your computer and use it in GitHub Desktop.

Select an option

Save kier0/558aae3cd882666a0aaf to your computer and use it in GitHub Desktop.
Wordpress - Get Page or Post TITLE + CONTENT by ID (change 6 to id #)
<h1><?php echo get_the_title(6); ?> </h1>
<?php
$id=6;
$post = get_post($id);
$content = apply_filters('the_content', $post->post_content);
echo $content;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment