WordPress.org

Ready to get started?Download WordPress

Forums

WordPress - display the page content without wrapper (1 post)

  1. seefeld
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic