miércoles, 1 de abril de 2009

Cambia los enlaces hacia tu feed sin .htaccess


Para redirigir todos los feeds de tu blog en WordPress hacia una especificada por ti. Solo añade el siguiente código al archivo functions.php:


function custom_feed_link($output, $feed) {
$feed_url = 'http://feedproxy.google.com/TrazosWeb';
$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;
}
function other_feed_links($link) {
$link = 'http://feedproxy.google.com/TrazosWeb';
return $link;
}
//Añadimos nuestras funciones a los filtros específicos
add_filter('feed_link','custom_feed_link', 1, 2);
add_filter('category_feed_link', 'other_feed_links');
add_filter('author_feed_link', 'other_feed_links');
add_filter('tag_feed_link','other_feed_links');
add_filter('search_feed_link','other_feed_links');




Solo debes cambiar las dirección de tu feed por la tuya.