Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_get_single_post ›

Desde1.0.0
Obsoleto3.5.0
wp_get_single_post ( $postid = 0, $mode = OBJECT )
Parâmetros: (2)
  • (int) $postid Post ID.
    Required: No
    Padrão:
  • (string) $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
    Required: No
    Padrão: OBJECT
Ver:
Retorna:
  • (WP_Post|null) Post object or array holding post contents and information
Definido em:
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.



Fonte

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