public function getPostType()
	{
		global $wp_query;

		if(isset($wp_query->post) && $wp_query->post->post_type)
		{
			return $wp_query->post->post_type;
		}
		if (isset($wp_query->query) && isset($wp_query->query['post_type']))
		{
			return $wp_query->query['post_type'];
		}
		else if(isset($wp_query->query_vars) && isset($wp_query->query_vars['post_type']))
		{
			return $wp_query->query_vars['post_type'];
		}

		return false;
	}
public function getPostType()
	{
		global $wp_query;

		if(isset($wp_query->post) && $wp_query->post->post_type)
		{
			return $wp_query->post->post_type;
		}
		if (isset($wp_query->query) && isset($wp_query->query['post_type']))
		{
			return $wp_query->query['post_type'];
		}
		else if(isset($wp_query->query_vars) && isset($wp_query->query_vars['post_type']))
		{
			return $wp_query->query_vars['post_type'];
		}

		return false;
	}
public function getPostType ( ) { global $ wp_query ; if ( isset ( $ wp_query -> post ) && $ wp_query -> post -> post_type ) { return $ wp_query -> post -> post_type ; } if ( isset ( $ wp_query -> query ) && isset ( $ wp_query -> query [ 'post_type' ] ) ) { return $ wp_query -> query [ 'post_type' ] ; } else if ( isset ( $ wp_query -> query_vars ) && isset ( $ wp_query -> query_vars [ 'post_type' ] ) ) { return $ wp_query -> query_vars [ 'post_type' ] ; } return false ; }
Return the post type slug if available

@return bool|string
Return the post type slug if available