Created
May 23, 2012 00:10
-
-
Save regisd/2772460 to your computer and use it in GitHub Desktop.
Wordpress theme "response" by Cyberchimps should use the same RSS in the icon link and alternate link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add this function in functions.php | |
/** Replaces RSS link from HTML 'head' with custom feed also used with the 'social icon' */ | |
function response_feed_links() { | |
global $themename, $themeslug, $options; | |
$my_feed=$options->get($themeslug.'_rsslink'); | |
if ($my_feed) { | |
echo '<link rel="alternate" type="application/rss+xml" title="RSS feed" href="'.$my_feed.'"/>'; | |
} | |
else { | |
feed_links(); | |
} | |
} | |
remove_action( 'wp_head', 'feed_links', 2); // Display the links to the general feeds: Post and Comment Feed | |
add_action('wp_head', 'response_feed_links'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah I see. Yes that makes a lot of sense, I will go ahead and use your code in our next round of updates. Thank you very much!