WordPress.org

Ready to get started?Download WordPress

Forums

The $post Object (2 posts)

  1. Will Anderson
    Member
    Posted 6 years ago #

    Hello, I've noticed in the documentation that a $post object is mentioned often, but I can't find any documentation (even function/variable list) for it anywhere. Could someone please point me in the right direction (even telling me what php file it's located in would be helpful!).

    Thanks a bunch!

    Will

  2. adamkempa
    Member
    Posted 6 years ago #

    I googled for awhile in vain before giving up and pulling it out of the class. I'm surprised this isn't available in the codex. I'm responding here for future usefulness.

    Here are the attributes that appear to be available:

    $post->post_author
    $post->post_date
    $post->post_date_gmt
    $post->post_content
    $post->post_content_filtered
    $post->post_title
    $post->post_excerpt
    $post->post_status
    $post->post_type
    $post->comment_status
    $post->ping_status
    $post->post_password
    $post->post_name
    $post->to_ping
    $post->pinged
    $post->post_modified
    $post->post_modified_gmt
    $post->post_parent
    $post->menu_order
    $post->guid

Topic Closed

This topic has been closed to new replies.

About this Topic