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:

functions.php
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.

  1. UpdraftPlus: WP Backup & Migration Plugin icon UpdraftPlus: WP Backup & Migration Plugin4+ million installs apply_filters( 'get_the_guid', $post->guid, $post->ID ) central/modules/posts.php:1102
  2. Gutentor icon Gutentor30,000+ installs apply_filters( 'get_the_guid', $post->guid, $post->ID ) includes/tools/class-gutentor-self-api-handler.php:2274
  3. WordPress REST API (Version 2) icon WordPress REST API (Version 2)10,000+ installs apply_filters( 'get_the_guid', $post->guid ) lib/endpoints/class-wp-rest-posts-controller.php:1167
  4. GeoDirectory icon GeoDirectory10,000+ installs apply_filters( 'get_the_guid', $gd_post->guid, $post->ID ) includes/api/class-geodir-rest-posts-controller.php:1415
  5. Bogo icon Bogo10,000+ installs apply_filters( 'get_the_guid', $translation->guid ) includes/rest-api.php:145
  6. FeedWordPress icon FeedWordPress8,000+ installs apply_filters( 'get_the_guid', $post_guid ) feedwordpresslocalpost.class.php:192
  7. MStore API icon MStore API2,000+ installs apply_filters( 'get_the_guid', $post->guid, $post->ID ) controllers/listing-rest-api/class.api.fields.php:4099
  8. Booking Ultra Pro Appointments Booking Calendar Plugin icon Booking Ultra Pro Appointments Booking Calendar Plugin400+ installs apply_filters( 'get_the_guid', $post->guid ) classes/bookingultra.class.php:1018
  9. Appmaker WP icon Appmaker WP100+ installs apply_filters( 'get_the_guid', $post->guid ) lib/endpoints/class-appmaker-wp-rest-legacy-posts-controller.php:547
  10. PDFDraft icon PDFDraft100+ installs apply_filters( 'get_the_guid', $post->guid, $post->ID ) src/Controllers/V1/PDFDesignRevisionsController.php:81
  11. AcrossAI Abilities Manager icon AcrossAI Abilities Manager100+ installs apply_filters( 'get_the_guid', $post->guid, $id ) includes/Abilities/Media/Media_Formatter.php:50
  12. Reactor: Core icon Reactor: Core30+ installs apply_filters( 'get_the_guid', $post['guid'] ) json-rest-api/lib/class-wp-json-posts.php:567
  13. REST API Search icon REST API Search20+ installs apply_filters( 'get_the_guid', $post->guid ) lib/class-wp-rest-search-controller.php:422
  14. PZZ API Client icon PZZ API Client20+ installs apply_filters( 'get_the_guid', $post['guid'] ) includes/class-pzz-json-posts-controller.php:310
  15. Podcastify icon Podcastify10+ installs apply_filters( 'get_the_guid', $post->guid, $post->ID ) includes/rest/class-wp-rest-posts-controller.php:1608
  16. Chimpify icon Chimpify10+ installs apply_filters( 'get_the_guid', $post->guid ) chimpify.php:522
  17. JSON REST API Subscriptions icon JSON REST API Subscriptions10+ installs apply_filters( 'get_the_guid', $post->guid ) lib/class-jras-notifier.php:89
  18. prograpper icon prograpper10+ installs apply_filters( 'get_the_guid', $post['guid'] ) wp-api/lib/class-wp-json-posts.php:567
  19. AWE Video icon AWE VideoFewer than 10 installs apply_filters( 'get_the_guid', $post->guid ) class-awe-videos-feed.php:279
  20. WP Users Pro Subscriptions Plugin icon WP Users Pro Subscriptions PluginFewer than 10 installs apply_filters( 'get_the_guid', $post->guid ) classes/wpuserspro.class.php:1049
  21. WP-Restify icon WP-RestifyFewer than 10 installs apply_filters( 'get_the_guid', $post['guid'] ) include/class-wp-json-posts.php:567
  22. WP eCommerce Betaout icon WP eCommerce BetaoutFewer than 10 installs apply_filters( 'get_the_guid', $post['guid'] ) lib/class-wp-json-wpecproduct.php:639
  23. Webinista WreadIt icon 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.