Core Function
View Source on Trac ↗ wp_get_single_post()
wp_get_single_post( mixed $postid = 0, mixed $mode = OBJECT ) Retrieve a single post, based on post ID.
Parameters 0 required
| Name / Type | Description |
|---|---|
| $postid int | Post ID. |
| $mode string | How to return result, either OBJECT, ARRAY_N, or ARRAY_A. |
Return Value
((WP_Post)
| null) Post object or array holding post contents and information
Function Information
Since Version
1.0.0
Source File
wp-includes/deprecated.php
Advertisement