get_post_type
get_post_type ( $post = null )
Parameters:- (int|WP_Post|null) post Optional. Post ID or post object. Default is global $post.
Returns:- (string|false) Post type on success, false on failure.
Defined at: - Introduced in WordPress: 2.1.0
- Deprecated in WordPress: —
Description
Retrieves the post type of the current post or of a given post.