you are here: codestackercodes [RSS]wordpress $post variables

wordpress $post variables

<?php
$post–>ID # ID of the current post.
$post–>post_category # Retrieves the ID of the post category.
$post–>post_parent # ID of the page parent. Useful for creating custom navigational elements.
$post–>post_title # Post Title
$post–>post_excerpt # Post excerpt
$post–>post_content # Retrieves all of the post content, along with any markup.
$post–>post_name # Retrieving the slug of a post.
$post–>guid # Post Url
$post–>post_author # ID of post author post_parent
$post–>post_type # Returns the type, page or post.
$post–>menu_order # Returns the menu order as set in the post/page editing window. Often menu items are sorted via this value.
$post–>post_date # Retrieves the integer timestamp for when the post was published. The output can be customized. See the php.net date manual.
$post–>post_modified # Retrieves the integer timestamp for when the post was last modified.
$post–>post_status # Retrieves one of five possible posts statuses: publish, private, draft, pending, future.
$post–>comment_count # Returns the number of comments, pings, and trackbacks for a given post.
?>

Comments