WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

get_page() unlike Loop returns the post content without html tags. I need tags. How can I fix this?

I don't want to change wysiwyg editor, here is the bad solution http://wordpress.org/support/topic/preserve-html-with-get_pages

share|improve this question
Please edit the question, instead of leaving comments to it. – scribu Jul 29 '11 at 10:52
what is your full code to output the content? – Michael Jul 29 '11 at 11:11
up vote 0 down vote accepted

I presume you are getting the page content like so:

$page_id = 1;
$page = get_page($page_id);
$content = $page->post_content;
echo $content;

If thats the case then you can run the content through the the_content filter:

$content = apply_filters('the_content', $content);

The will process the content as if it was run through the_content() function.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.