WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/is post type hierarchical

Description

This Conditional Tag checks if the post type is hierarchical. This is a boolean function, meaning it returns either TRUE or FALSE (A false return value might also mean that the post type does not exist).

Checks to make sure that the post type exists first. Then gets the post type object, and finally returns the hierarchical value in the object.

Usage

<?php is_post_type_hierarchical$post_type?>

Parameters

$post_type
(string) (required) Name of post type
Default: None

Return Values

(boolean) 
Whether the post_type is hierarchical

Examples

Notes

Change Log

Since: 3.0.0

Source File

is_post_type_hierarchical() is located in wp-includes/post.php.

Related

Post Types: register_post_type(), add_post_type_support(), remove_post_type_support(), post_type_supports(), post_type_exists(), set_post_type(), get_post_type(), get_post_types(), get_post_type_object(), get_post_type_capabilities(), get_post_type_labels(), is_post_type_hierarchical(), is_post_type_archive(), post_type_archive_title()

See also index of Function Reference and index of Template Tags.