Definition:
function is_post_type_archive( $post_types = '' ) {}
Is the query for a post type archive page?
Parameters
- mixed $post_types: Optional. Post type or array of posts types to check against.
Source code
function is_post_type_archive( $post_types = '' ) {
if ( empty( $post_types ) || !$this->is_post_type_archive )
return (bool) $this->is_post_type_archive;
$post_type_object = $this->get_queried_object();
return in_array( $post_type_object->name, (array) $post_types );
}
9908

February 24, 2011 


No comments yet... Be the first to leave a reply!