Иван Данилин
С помощью ниже опубликованного кода можно установить автоматический редирект вашей РСС-ленты в «Feedburner», без использования каких-либо плагинов. Просто скопируйте и вставьте данный код в functions.php используемого шаблона. Не забудьте поменять $feed_url на свой.
function custom_feed_link($output, $feed) { $feed_url = 'http://feeds.feedburner.com/danilin/OIAv'; $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://feeds.feedburner.com/wpbeginner'; return $link; } //Add our functions to the specific filters 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');
И всё.
,
опубликовано 15 лет назад