Title: the_attachment_links
Published: April 25, 2014
Last modified: August 20, 2026

---

# the_attachment_links( int|bool $id = false )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/the_attachment_links/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/the_attachment_links/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/the_attachment_links/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/the_attachment_links/?output_format=md#changelog)

This function has been deprecated since 3.7.0.

This was once used to display attachment links. Now it is deprecated and stubbed.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/the_attachment_links/?output_format=md#parameters)󠁿

 `$id`int|booloptional

Default:`false`

## 󠀁[Source](https://developer.wordpress.org/reference/functions/the_attachment_links/?output_format=md#source)󠁿

    ```php
    function the_attachment_links( $id = false ) {
    	_deprecated_function( __FUNCTION__, '3.7.0' );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/deprecated.php#L1226)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/deprecated.php#L1226-L1228)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/the_attachment_links/?output_format=md#related)󠁿

| Uses | Description | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/the_attachment_links/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Deprecated.  | 
| [2.0.0](https://developer.wordpress.org/reference/since/2.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_attachment_links%2F)
before being able to contribute a note or feedback.