This function returns the title of the current post or the designated post.
Parameter | Details |
---|---|
$post | (int) (optional) Post ID or post object. Default is the the current post's id. |
If you plan to get the title of a post or page using a post loop, it is suggested to use the_title() instead.