All, I'm trying to have a side navigation menu that once you click on a link it basically pulls the content of that wordpress page and displays it. I've got the following code to do this:

$qry = "Select post_content from wp_jjfuap_posts where ID='$menu->object_id'";
$result = mysql_query($qry);
$resultset = mysql_fetch_array($result);
$output = apply_filters( 'the_content', $resultset['post_content'] );

The issue is that it doesn't translate any HTML. It simply just displays the HTML. For example, it will output the following:

<ul><li>Test</li><li>Another test</li></ul>
<img src=”http://www.website.com/wp-content/uploads/2011/10/team.jpg” alt=”" width=”300″ height=”240″ /> <h2 style=”margin: 25px 0 0 0;”>Al</h2> <span class=”small”><em>Person</em></span> <p style=”text-align: justify;”>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris lacinia justo quis neque da</p>

How can I get Wordpress to actually display the correct HTML using this method?


  • What do you mean, "translate" the html? Commented Mar 16, 2012 at 0:23
  • @goldenapples I just means it displays the HTML like that instead of actually dislaying the image or displaying the Test and Another Test in an unordered format list. Commented Mar 16, 2012 at 0:51

1 Answer 1


I changed the way I went about this and did this to solve it:

$page = get_page( $menu->object_id );
$output .= apply_filters( 'the_content', $page->post_content );

My information now shows up correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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