How to Change Your Default RSS Feed URL in WordPress

by • On Apr 22, 12 5:13am, Updated: Nov 16, 14 13:27pm • 5849 Views

If your blog site has a good number of visitors, chances are there that some of them will subscribe to your site’s RSS feed so that they can get the latest update from your site without even visiting. I think it’s a fantastic way to deliver your content. Now, if you go to the home page of your site and take a look at the source code. You will find a line which looks like similar to the line given below.

<link rel="alternate" type="application/rss xml" title="Your Blog RSS Feed" href="http://www.yoursite.com/feed/" />

WordPress Tips and TricksThis is the default RSS feed URL written by WordPress. Now, it’s a very common feature of WordPress and it is pretty much the same for most of the WordPress based sites. Using a very small snippet code, we can change the default RSS feed’s URL. It could be really useful for those who wants to use third party web RSS feed management application like feedburner, feedcat, feedity etc. as they will provide you a custom URL for your feed.

Whether you want to monetize your RSS feed or not, it’s always a good idea to use third party application to distribute your content. It will give your web server some extra time to breath by taking over the content delivery job on their own shoulder.

No matter whatever the URL that you want to replace with the default WordPress url, simply copy the following snippet code and paste it on your theme’s functions.php file.

<?php
function custom_rss($output, $show) {
if (in_array($show, array('rss_url', 'rss2_url', 'rss', 'rss2', '')))
$output = 'your_custom_rss_feed_url_goes_here';
return $output; }
add_filter('bloginfo_url', 'custom_rss', 10, 2);
add_filter('feed_link', 'custom_rss', 10, 2);
?>

Don’t forget to change the URL with yours one. Once done, just update the functions.php file. Now, go back to your site’s home page and take a look at the source code. Congratulations! you have just successfully changed your default RSS feed URL of your WordPress based site.

Download this snippet in text format.

You can follow us on Twitter, add on your Google+ circle or Like our Facebook page to get the latest news, updates and reviews.

advertisement

Comments