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



has_post_parent › WordPress Function

Desde5.7.0
Obsoleton/a
has_post_parent ( $post = null )
Parâmetros:
  • (int|WP_Post|null) $post Optional. Post ID or WP_Post object. Default is global $post.
    Required: No
    Padrão: null
Retorna:
  • (bool) Whether the post has a parent post.
Definido em:
Codex:

Returns whether the given post has a parent post.



Fonte

function has_post_parent( $post = null ) {
	return (bool) get_post_parent( $post );
}