wp_get_single_post()WP 1.0.0

Deprecated from version 3.5.0. It is no longer supported and can be removed in future releases. Use get_post() instead.

Retrieve a single post, based on post ID.

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

Uses: get_post()

No Hooks.


WP_Post|null. Post object or array holding post contents and information


wp_get_single_post( $postid, $mode );
Post ID.
How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
Default: OBJECT



Since 1.0.0 Introduced.
Deprecated Since 3.5.0 Use get_post()

Code of wp_get_single_post() WP 6.0.1

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