Title: the_guid
Published: April 23, 2015
Last modified: May 20, 2026

---

# apply_filters( ‘the_guid’, string $post_guid, int $post_id )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/the_guid/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/hooks/the_guid/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/hooks/the_guid/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/the_guid/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/the_guid/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/the_guid/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/the_guid/?output_format=md#wp--skip-link--target)

Filters the escaped Global Unique Identifier (guid) of the post.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/the_guid/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/hooks/the_guid/?output_format=md#see-also)󠁿

 * [get_the_guid()](https://developer.wordpress.org/reference/functions/get_the_guid/)

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

 `$post_guid`string

Escaped Global Unique Identifier (guid) of the post.

`$post_id`int

The post ID.

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

    ```php
    echo apply_filters( 'the_guid', $post_guid, $post_id );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/post-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/post-template.php#L206)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/post-template.php#L206-L206)

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

| Used by | Description | 
| [the_guid()](https://developer.wordpress.org/reference/functions/the_guid/)`wp-includes/post-template.php` |

Displays the Post Global Unique Identifier (guid).

  |

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

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

## User Contributed Notes

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