get_the_guid WordPress Filter Hook

The get_the_guid WordPress hook is used to get the unique identifier (guid) for a post. This guid is used in feeds and trackbacks.

apply_filters( 'get_the_guid', string $guid, int $id ) #

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


Parameters

$guid

(string)Global Unique Identifier (guid) of the post.

$id

(int)The post ID.


Top ↑

More Information

Note that the filter callback function must return the guid after it is finished processing, or any code using the guid (for example: RSS feeds) will break, and other plugins also filtering the guid may generate errors.


Top ↑

Source

File: wp-includes/post-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.