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



is_post_type_hierarchical ›

Desde3.0.0
Obsoleton/a
is_post_type_hierarchical ( $post_type )
Parâmetros:
  • (string) $post_type Post type name
    Required: Yes
Ver:
Retorna:
  • (bool) Whether post type is hierarchical.
Definido em:
Codex:

Whether the post type is hierarchical.

A false return value might also mean that the post type does not exist.



Fonte

function is_post_type_hierarchical( $post_type ) {
	if ( ! post_type_exists( $post_type ) ) {
		return false;
	}

	$post_type = get_post_type_object( $post_type );
	return $post_type->hierarchical;
}