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:

Description

Retrieves the post type of the current post or of a given post.

Related Functions

get_post_types, set_post_type, get_post_time, get_post_mime_type, get_post_mime_types

Top Google Results

User discussions

wpseek mobile