WordPress filter hook · part of WordPress core
get_the_guid
A WordPress core filter that 23 plugins also fire themselves, running on 4.1M+ sites between them.
“This filter is documented in wp-includes/post-template.php”
How to use get_the_guid
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'get_the_guid', function( $guid ) {
// Change $guid here.
return $guid;
}, 10, 1 );Argument names come from WordPress REST API (Version 2)'s source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
23 plugins that fire get_the_guid
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
UpdraftPlus: WP Backup & Migration Plugin4+ million installs
apply_filters( 'get_the_guid', $post->guid, $post->ID )central/modules/posts.php:1102 -
Gutentor30,000+ installs
apply_filters( 'get_the_guid', $post->guid, $post->ID )includes/tools/class-gutentor-self-api-handler.php:2274 -
WordPress REST API (Version 2)10,000+ installs
apply_filters( 'get_the_guid', $post->guid )lib/endpoints/class-wp-rest-posts-controller.php:1167 -
GeoDirectory10,000+ installs
apply_filters( 'get_the_guid', $gd_post->guid, $post->ID )includes/api/class-geodir-rest-posts-controller.php:1415 -
Bogo10,000+ installs
apply_filters( 'get_the_guid', $translation->guid )includes/rest-api.php:145 -
FeedWordPress8,000+ installs
apply_filters( 'get_the_guid', $post_guid )feedwordpresslocalpost.class.php:192 -
MStore API2,000+ installs
apply_filters( 'get_the_guid', $post->guid, $post->ID )controllers/listing-rest-api/class.api.fields.php:4099 -
Booking Ultra Pro Appointments Booking Calendar Plugin400+ installs
apply_filters( 'get_the_guid', $post->guid )classes/bookingultra.class.php:1018 -
Appmaker WP100+ installs
apply_filters( 'get_the_guid', $post->guid )lib/endpoints/class-appmaker-wp-rest-legacy-posts-controller.php:547 -
PDFDraft100+ installs
apply_filters( 'get_the_guid', $post->guid, $post->ID )src/Controllers/V1/PDFDesignRevisionsController.php:81 -
AcrossAI Abilities Manager100+ installs
apply_filters( 'get_the_guid', $post->guid, $id )includes/Abilities/Media/Media_Formatter.php:50 -
Reactor: Core30+ installs
apply_filters( 'get_the_guid', $post['guid'] )json-rest-api/lib/class-wp-json-posts.php:567 -
REST API Search20+ installs
apply_filters( 'get_the_guid', $post->guid )lib/class-wp-rest-search-controller.php:422 -
PZZ API Client20+ installs
apply_filters( 'get_the_guid', $post['guid'] )includes/class-pzz-json-posts-controller.php:310 -
Podcastify10+ installs
apply_filters( 'get_the_guid', $post->guid, $post->ID )includes/rest/class-wp-rest-posts-controller.php:1608 -
Chimpify10+ installs
apply_filters( 'get_the_guid', $post->guid )chimpify.php:522 -
JSON REST API Subscriptions10+ installs
apply_filters( 'get_the_guid', $post->guid )lib/class-jras-notifier.php:89 -
prograpper10+ installs
apply_filters( 'get_the_guid', $post['guid'] )wp-api/lib/class-wp-json-posts.php:567 -
AWE VideoFewer than 10 installs
apply_filters( 'get_the_guid', $post->guid )class-awe-videos-feed.php:279 -
WP Users Pro Subscriptions PluginFewer than 10 installs
apply_filters( 'get_the_guid', $post->guid )classes/wpuserspro.class.php:1049 -
WP-RestifyFewer than 10 installs
apply_filters( 'get_the_guid', $post['guid'] )include/class-wp-json-posts.php:567 -
WP eCommerce BetaoutFewer than 10 installs
apply_filters( 'get_the_guid', $post['guid'] )lib/class-wp-json-wpecproduct.php:639 -
Webinista WreadItFewer than 10 installs
apply_filters( 'get_the_guid', $guid, $id )classes/Webinista/class-helpers.php:476
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.