Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

wp_get_attachment_link()

3 tags 1 category

wp_get_attachment_link() — Retrieves an attachment page link using an image or icon, if possible.

Inputs: $post (int|WP_Post): Optional. Post ID or post object. $size (string|int[]): Optional. Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default ‘thumbnail’. $permalink (bool): Optional. Whether to add permalink to image. Default false. $icon (bool): Optional. Whether the attachment is an icon. Default false. $text (string|false): Optional. Link text to use. Activated by passing a string, false otherwise. Default false.

Returns string: HTML content.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…