• If any developers are reading:
    Wouldn’t it be good to have a new function “the_content_rss” for content inclusion in the feed scripts?
    I’d like to have relative links in my postings (or at least site-relative, like “/archive/123/” instead of “https://blog.example.org/archive/123/”).
    But in the feed, links have to be absolute, so I wrote a simple filter for my_hacks.php which does just that conversion.
    But it would be even better to have a filter that’s only applied for RSS content, so links can stay relative on the site, but are converted to absolute links in the feeds.
    Comments?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter nicokaiser

    (@nicokaiser)

    backslashes (amp;#92;) are broken in my comment, that’s bad…

    I was just searching for an answer for this issue, and found this workaround for anyone else with the same problem:

    add_filter(‘the_content’, ‘my_filter’);

    function my_filter($content){
    global $doing_rss;
    if(!$doing_rss)
    return $content;

    //do your rss-only filtering here
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘the_content_rss()? (about relative links)’ is closed to new replies.