This property / method will either return the current post object, assign a new post as the current post or create and return a new post object if a post ID argument is given.


object atom()->post

object atom()->post($post [, $setup_postdata = false])

Post ID (an object can also be given)
Sets up WP’s post globals to point to this post. If set to true, resetCurrentPost() must be called after all operations on the current object are completed, so the original post gets restored.


// output the title of the post that has the ID 2

// output the title of the current post