View difference between Paste ID: iWU4Fcsa and PRG2dxQB
SHOW: | | - or go back to the newest paste.
1
<?php
2
// The page ID I am using is 2, you should substitute whatever is
3
// appropriate in your case
4
$page = get_post(2);
5
6
// WordPress performs all sorts of magic behind the scenes - like
7-
// automatically. This can be replicated as follows ... but please
7+
// automatically adding paragraphs. 
8-
// note some plugins/themes won't play nicely if you do this
8+
// 
9
// This can be replicated as follows ... but please note some
10
// plugins/themes won't play nicely if you do this
11
$content = apply_filters('the_content', $page->post_content);
12
13
// Last but not least we'll print the content to the screen
14
echo $content
15
?>