function is_post_type_archive( $post_types = '' ) {}

Is the query for a post type archive page?


  • 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 );



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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: