Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /****************************
- referencia de uso: http://codex.wordpress.org/Function_Reference/get_post
- ID
- (integer) The post ID
- post_author
- (integer) The post author's ID
- post_date
- (string) The datetime of the post (YYYY-MM-DD HH:MM:SS)
- post_date_gmt
- (string) The GMT datetime of the post (YYYY-MM-DD HH:MM:SS)
- post_content
- (string) The post's contents
- post_title
- (string) The post's title
- post_category
- (integer) The post category's ID. Note that this will always be 0 (zero) from wordpress 2.1 onwards. To determine a post's category or categories, use get_the_category().
- post_excerpt
- (string) The post excerpt
- post_status
- (string) The post status (publish|pending|draft|private|static|object|attachment|inherit|future|trash)
- comment_status
- (string) The comment status (open|closed|registered_only)
- ping_status
- (string) The pingback/trackback status (open|closed)
- post_password
- (string) The post password
- post_name
- (string) The post's URL slug
- to_ping
- (string) URLs to be pinged
- pinged
- (string) URLs already pinged
- post_modified
- (string) The last modified datetime of the post (YYYY-MM-DD HH:MM:SS)
- post_modified_gmt
- (string) The last modified GMT datetime of the post (YYYY-MM-DD HH:MM:SS)
- post_content_filtered
- (string)
- post_parent
- (integer) The parent post's ID (for attachments, etc)
- guid
- (string) A link to the post. Note: One cannot rely upon the GUID to be the permalink (as it previously was in pre-2.5), Nor can you expect it to be a valid link to the post. It's merely a unique identifier, which so happens to be a link to the post at present.
- menu_order
- (integer)
- post_type
- (string) (post|page|attachment)
- post_mime_type
- (string) Mime Type (for attachments, etc)
- comment_count
- (integer) Number of comments
- ***************************/
- ?>
- <div id='post1'>
- <?php
- $post1 = 2;
- $post = get_post($post1);
- ?>
- <h2> <?php echo $post->post_title?> </h2>
- <?php echo $post->post_content ?>
- </div>
- <div id='post2'>
- <?php
- $post2 = 56;
- $post = get_post($post2);
- ?>
- <h2> <?php echo $post->post_title?> </h2>
- <?php echo $post->post_content ?>
- </div>
- <div id='post3'>
- <?php
- $post3 = 66;
- $post = get_post($post3);
- ?>
- <h2> <?php echo $post->post_title?> </h2>
- <?php echo $post->post_content ?>
- </div>
- <div id='post4'>
- <?php
- $post4 = 104;
- $post = get_post($post4);
- ?>
- <h2> <?php echo $post->post_title?> </h2>
- <?php echo $post->post_content ?>
- </div>
- <div id='post5'>
- <?php
- $post5 = 130;
- $post = get_post($post5);
- ?>
- <h2> <?php echo $post->post_title?> </h2>
- <?php echo $post->post_content ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment