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 ?
Aucun commentaire:
Enregistrer un commentaire