Forums

post_content not working for get_post() (2 posts)

  1. spstieng
    Member
    Posted 7 months ago #

    This is the code I use, and the result i s blank:

    $postID = 15;
    $thePost = get_post($postID);
    echo $thePost->post_content;

    If I change post_content to post_title, it ouputs the title.

  2. stvwlf
    Member
    Posted 7 months ago #

    do a var_dump to see what is going on

    $postID = 15;
    $thePost = get_post($postID);
    echo $thePost->post_content;

    var_dump($thePost);

Reply

You must log in to post.

About this Topic