wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_get_single_post › WordPress Function

Since1.0.0
Deprecated3.5.0
wp_get_single_post ( $postid = 0, $mode = OBJECT )
Parameters: (2)
  • (int) $postid Post ID.
    Required: No
    Default:
  • (string) $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
    Required: No
    Default: OBJECT
See:
Returns:
  • (WP_Post|null) Post object or array holding post contents and information
Defined at:
Codex:

Retrieve a single post, based on post ID.

Has categories in 'post_category' property or key. Has tags in 'tags_input' property or key.


Source

function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
	_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
	return get_post( $postid, $mode );
}