The feed template files call the_guid()
, which calls get_the_guid()
, which has a filter named (surprisingly) get_the_guid
. You can hook into this filter to change the output. The filter only gets the current GUID, not the post ID, so look this up in the global variable if you need it.
add_filter( 'get_the_guid', 'wpse17463_get_the_guid' );
function wpse17463_get_the_guid( $guid )
{
return 'http://example.com/guid/' . sha1( $guid );
}
See also this Trac ticket which proposes to change the current GUID format to a more unique hash.
Related Posts:
- WordPress RSS feed – filter RSS content by custom field value
- Change WordPress RSS link with filter?
- Changing WordPress core without hacking core
- How do filters and hooks really work in PHP
- Trouble understanding apply_filters()
- How to show page content in feed?
- Filter any HTTP request URI?
- How many filter/action hooks are healthy?
- Filter specific shortcode output?
- Where to hook into post content?
- Valid characters for actions, hooks and filters
- How to hook into unregistering a widget instance?
- What hook do I use to edit the post statuses option in admin?
- Filter hook before create order WooCommerce
- How to disable all WordPress emails modularly and programatically?
- apply_filters() slices away needed arguments
- How to add attribute to output with wp_video_shortcode add_filter
- How to change Woocommerce breadcrumbs content?
- Load different template file when condition met?
- How to enable visual editor when editing comments on the dashboard?
- Please explain me what the do_action does
- Is it possible to Hook/Filters Attachment Creation?
- Filter all html output
- Can’t get wp_title filter working in twenty sixteen child theme
- Removing labels and tag on WordPress’s default login form
- How to trigger the core WPLANG to make automatically set a language when the theme is activated? [duplicate]
- How to hook some Unicode texts into calendar widget safely?
- How to add attributes to tag when template cannot be directly modified
- How can I add a fifth option to the alignment picker?
- Too many actions/filters!
- Which hook is fired when inserting media into a post
- How does WordPress call functions attached to a certain action hook before calling functions attached to other hooks
- WordPress tag cloud add more links
- Why anything done on comments_array hook gets reset?
- Is it possible to track down Actions and Filters?
- Yoast SEO hooks overriding themselves
- add filter login_redirect does not contain original requested redirect
- get_header and hook avoid normal call
- Question about how do wordpress filters/actions work
- How to center oEmbedded content
- How to add numeric slug for child page in WordPress 5.9?
- How to change the order (priority) of registered filters (or actions) (e.g. for the_content)?
- How to change the order of HTML output of a core block?
- Filter taxonomy admin pagination
- Feed, RSS not able to clear the cache and cannot change the limit of cache life time
- WP action/filter to modify title before header output and article output?
- Using wp_handle_upload() to Direct Specific Path by Using $overrides
- Post Content, Special Characters and Filters
- How to filter for user registration, be able to throw error message
- Gutenberg – Add align controls to a custom block
- Add default user field to WooCommerce checkout [closed]
- Customize title, description and focused keyword [closed]
- How to know what filter to use and how to use it?
- Filtering the post list in the admin area
- How to check if a protected hook is hooked?
- How to customize category_description()?
- Gutenberg Block – Post Featured Image Filter Hook
- Disadvantage of using filters & hooks multiple times
- Admin post list – adding an option to the date filter dropdown
- Modify message displayed on post save
- Pass debug_backtrace() in WordPress filter
- How to override include_once pointed file using add_filter?
- Remove actions/filters that are set with create_function()
- Get The Caller (Plugin / Theme / Core) For All actions & Hook in WordPress
- comment_for() Custom fields not visible when user is logged in
- How to access page variable inside action hook
- I need to hook and change language of facebook sdk
- Use has_filter on comment_post
- Renaming wordpress login and get new password button
- Is this hook really deprecated? ( manage_{$taxonomy}_custom_column )
- Hook in a sidebar widget and add some markup
- Need to return shortcode text instead of the output
- BuddyPress – A hook available to hide custom born date on public profile view?
- ‘manage_users_custom_column’ is a filter, but ‘manage_posts_custom_column’ is an action. Why?
- Scanning for custom embed and prefetching
- The gettext hook doesnt work on text with links
- Remove and replace woocommerce add to cart button [closed]
- Hook to change the site URL
- Modify WordPress Page Title ()
- Add an attribute to the root from functions.php with add_filter
- Would like to use hook or filters to customize email templates
- Hook to add content after date in post?
- Is it possible to assign a css id to a row in plugins list table?
- Add Index to Item in WordPress Gallery
- Remove image of srcset
- Print only parent categories of post in custom RSS feed
- Re-order search results with posts_orderby filter and post meta value
- Change url to posts if they have custom tax only
- wp_editor customization
- Converting restricted html in comments to bbcode
- How to add a class to Buddypress avatars in the Activity stream? [closed]
- WooCommerce comments_template Filter Not Firing
- NextGEN Gallery: Adding drop-down menu widget to gallery view without modifying plugin code [closed]
- str_replace css meta tag?
- How do you disable the verification process of user email changes?
- Better way to change the default password reset url with the woocommerce one?
- Hooking/Filtering theme name to add theme directory
- Replacing text using add_filter
- Passing value from one hook to another
- Change password reqts with NO plugin without breaking resetpass link?