Support » Fixing WordPress » WordPress – display the page content without wrapper

  • How to display the content for given page ID withot the <p></p> wrapper?

    The method I’m currently using is:

    <?php
    $id=21;
    $post = get_page($id);
    $content = apply_filters(‘the_content’, $post->post_content);
    echo $content;
    ?>

    For example page ID = 21 has the following content: “Some content”

    What the wordpress echo is

    <p>Some content</p>

    Any suggestion much appreciated.

  • The topic ‘WordPress – display the page content without wrapper’ is closed to new replies.