Skip to content

Instantly share code, notes, and snippets.

@ABooooo
Created September 7, 2017 00:38
Show Gist options
  • Save ABooooo/8bfc24f569d37511ff07b5a0193adb1c to your computer and use it in GitHub Desktop.
Save ABooooo/8bfc24f569d37511ff07b5a0193adb1c to your computer and use it in GitHub Desktop.
show post or page with ID
$post_id = 23;
$queried_post = get_post($post_id);
$title = $queried_post->post_title;
echo '<p class="jumboTitle">';
echo $title;
echo '</p>';
echo $queried_post->post_content;
//https://www.tipsandtricks-hq.com/query-or-show-a-specific-post-in-wordpress-php-code-example-44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment