function get_the_post_type_description() {
$post_type = get_query_var( \'post_type\' );
if ( is_array( $post_type ) ) {
$post_type = reset( $post_type );
}
$post_type_obj = get_post_type_object( $post_type );
// Check if a description is set.
if ( isset( $post_type_obj->description ) ) {
$description = $post_type_obj->description;
} else {
$description = \'\';
}
return apply_filters( \'get_the_post_type_description\', $description, $post_type_obj );
}
以下是WP v4的未来功能。9,它检索post类型存档的描述并返回(字符串)post类型描述。我想它可以帮你。