1. Home
  2. Wordpress
  3. Get post

get_post returns an object holding information about the post. By passing an argument you can access object arguments and return the data. Available data - ID, post_author, post_date,post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_content_filtered, post_parent, guid, menu_order, post_type, post_mime_type and comment_count.

#wordpress#php
get_post('ID');
copy
Full Wordpress cheatsheet
NordVPN NordVPN