Quantcast
Viewing latest article 5
Browse Latest Browse All 6

How to add more than one RSS Feed Link for wordpress

I'm using code to change Rss Feed Link for my wordpress site, it's working but I don't know how to add more than one rss link appear when someone click on browser Rss Icon, I need these links to appear for all pages below each other for categories "products", "blog" and "news".

here is the code which I'm using to change my rss link

add_filter('feed_link','custom_feed_link', 1, 2);

function custom_feed_link($output, $feed) {

    $feed_url = 'http://MYSITE/category/products/feed';

    $feed_array = array('rss' => $feed_url, 'rss2' => $feed_url, 'atom' => $feed_url, 'rdf' => $feed_url, 'comments_rss2' => '');
    $feed_array[$feed] = $feed_url;
    $output = $feed_array[$feed];

    return $output;
}

I tried to return array, but it can't work, what I should do ?

Image may be NSFW.
Clik here to view.
enter image description here


Viewing latest article 5
Browse Latest Browse All 6

Trending Articles