WordPress at a glance

Post Thumbnails (category)

get_attachment_link()

Retrieves the permalink for an attachment.

get_post_thumbnail_id()

Retrieve post thumbnail ID.

get_the_post_thumbnail()

Gets the IMG tag of the post thumbnail (if exists).

has_post_thumbnail()

Check if post has an image attached.

the_attachment_link()

Display an attachment page link using an image or icon.

the_post_thumbnail()

Display the post thumbnail.

wp_get_attachment_image()

Get an HTML img element representing an image attachment

wp_get_attachment_image_src()

Retrieve an image to represent an attachment.

wp_get_attachment_image_url()

Get the URL of an image attachment.

wp_get_attachment_link()

Gets a link to the attachment file or WP attachment page. Returns the <a> tag.