the_guid
Filter HookDescription
Filters the escaped Global Unique Identifier (guid) of the post.Hook Information
| File Location | wp-includes/post-template.phpView on GitHub | 
| Hook Type | Filter | 
| Line Number | 206 | 
Hook Parameters
| Type | Name | Description | 
|---|---|---|
| string | $post_guid | Escaped Global Unique Identifier (guid) of the post. | 
| int | $post_id | The post ID. | 
Usage Examples
                        Basic Usage
                    
                    <?php
// Hook into the_guid
add_filter('the_guid', 'my_custom_filter', 10, 2);
function my_custom_filter($post_guid, $post_id) {
    // Your custom filtering logic here
    return $post_guid;
}
Source Code Context
                        wp-includes/post-template.php:206
                        - How this hook is used in WordPress core
                    
                    <?php
 201  	 * @see get_the_guid()
 202  	 *
 203  	 * @param string $post_guid Escaped Global Unique Identifier (guid) of the post.
 204  	 * @param int    $post_id   The post ID.
 205  	 */
 206  	echo apply_filters( 'the_guid', $post_guid, $post_id );
 207  }
 208  
 209  /**
 210   * Retrieves the Post Global Unique Identifier (guid).
 211   *
PHP Documentation
<?php
/**
	 * Filters the escaped Global Unique Identifier (guid) of the post.
	 *
	 * @since 4.2.0
	 *
	 * @see get_the_guid()
	 *
	 * @param string $post_guid Escaped Global Unique Identifier (guid) of the post.
	 * @param int    $post_id   The post ID.
	 */
                        Quick Info
                    
                    - Hook Type: Filter
- Parameters: 2
- File: wp-includes/post-template.php
                        Related Hooks
                    
                    Related hooks will be displayed here in future updates.
