WP_REST_Posts_Controller::prepare_links()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Prepares links for the request.
|
WP_REST_Posts_Controller::prepare_item_for_response()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Prepares a single post output for response.
|
get_the_post_thumbnail_caption()wp-includes/post-thumbnail-template.php | Returns the post thumbnail caption.
|
get_oembed_response_data_rich()wp-includes/embed.php | Filters the oEmbed response data to return an iframe embed code.
|
get_the_post_thumbnail_url()wp-includes/post-thumbnail-template.php | Returns the post thumbnail URL.
|
WP_Media_List_Table::column_title()wp-admin/includes/class-wp-media-list-table.php | Handles the title column output.
|
edit_form_image_editor()wp-admin/includes/media.php | Displays the image and editor in the post editor
|
get_media_item()wp-admin/includes/media.php | Retrieves HTML form for modifying the image attachment.
|
has_post_thumbnail()wp-includes/post-thumbnail-template.php | Determines whether a post has an image attached.
|
update_post_thumbnail_cache()wp-includes/post-thumbnail-template.php | Updates cache for thumbnails in the current loop.
|
get_the_post_thumbnail()wp-includes/post-thumbnail-template.php | Retrieves the post thumbnail.
|
prepend_attachment()wp-includes/post-template.php | Wraps attachment in paragraph tag before content.
|
wp_prepare_attachment_for_js()wp-includes/media.php | Prepares an attachment post object for JS, where it is expected to be JSON-encoded and fit into an Attachment model.
|
wp_playlist_shortcode()wp-includes/media.php | Builds the Playlist shortcode output.
|
wp_xmlrpc_server::mw_getPost()wp-includes/class-wp-xmlrpc-server.php | Retrieves a post.
|
wp_xmlrpc_server::mw_getRecentPosts()wp-includes/class-wp-xmlrpc-server.php | Retrieves list of recent posts.
|
wp_xmlrpc_server::_prepare_post()wp-includes/class-wp-xmlrpc-server.php | Prepares post data for return in an XML-RPC object.
|
Note that the return value is typically a string, not an integer (have not yet seen the function return an integer).
Show all attachments for the current post except the Featured Image
To get all post attachments except the Featured Image, you can use this function with something like
get_posts()
.Do this inside The_Loop (where
$post->ID
is available).
To set the post thumbnail, use
set_post_thumbnail
:If you would like to retrieve the post thumbnail id outside of WP_Query Object and can’t get it by the
get_post_thumbnail_id()
function, you could use the below code.