Possible? Different post titles: one for post, one for RSS feed? (3 posts)

  1. altfgcom
    Posted 4 years ago #


    Is it at all possible to have different post titles for the RSS feed? Or...?

    For instance:

    I write a post titled: "Movies are great." But in the RSS feed, that title shows up as "A great time at the movies" or some such. Is that at all possible?

    Reason for this: problems we've been having with duplicate content in the last six months or so.

    Any assistance would be MUCH appreciated.

  2. popper
    Posted 4 years ago #

    A filter, combined with a custom field should work:

    function rss_filter($title) {
    	global $post;
            // add a custom field named 'rss_title' to the post
    	$rss_title = get_post_meta($post->ID, 'rss_title', true);
    	return $rss_title;
    add_filter('the_title_rss', 'rss_filter',10);

    Function above works, but doesn't check for the case when the custom field doesn't exist, which you should probably add :).

  3. altfgcom
    Posted 4 years ago #


    Thank you for very much (really!) for your response.

    I'm looking now at the codex to figure out how to create a custom field. It doesn't look too complicated...

    Now, *IF* you get a chance, would you mind looking at this other query (re: manual excerpts for feeds/automatic excerpts for homepage/tag archives)?


    We've tried copying various function commands (for excerpts) that we found at this forum and elsewhere, but no luck. Got "parse error" or 500 error messages.

    Once again, thank you for your help. Much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic