wp_get_single_post


wp_get_single_post ( $postid = 0, $mode = OBJECT )

Parameters:
  • (int) postid Post ID.
  • (string) mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
See:
Returns:
  • (WP_Post|null) Post object or array holding post contents and information
Defined at:

Description

Retrieve a single post, based on post ID.Has categories in 'post_category' property or key. Has tags in 'tags_input' property or key.

Related Functions

get_next_post, wp_get_recent_posts, wp_remote_post, wp_insert_post, wp_delete_post

Top Google Results

User discussions

wpseek mobile