WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So i got the RSS feed which output some custom post types, but the GUID looks bad to me, it's like:


The reason i want to change this is that I don't need people to know it's Wordpress or to see my custom post type name (this is very important in this project)

Is there a filter or hook to rewrite this?


share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
thanks, that's what i needed exactly ) – Alex May 17 '11 at 14:42

I didn't get where you see that GUID. But if it's the title link, you can try:

function my_permalink($permalink) {
    global $wp_query;
    $permalink = get_permalink( $wp_query->post->ID );
    return $permalink;

add_filter('the_permalink_rss', 'my_permalink');
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.