Last active
September 5, 2018 19:52
-
-
Save indeedably/5aaddc8124b39299246c7cbd4d26cf30 to your computer and use it in GitHub Desktop.
How to add RSS feed to Wordpress AddToAny plugin
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
/* | |
The AddToAny plugin is a great (and inobtrusive) way to add social sharing buttons to Wordpress posts. | |
It does not natively include RSS feed support however. To rectify that: | |
1. Open your Wordpress theme's functions.php file located in /wp-content/themes/[YOUR THEME]/ | |
2. Paste the code snippet below into your functions.php | |
3. Save to have the changes take effect. | |
*/ | |
function addtoany_add_share_services( $services ) { | |
$services['RSS'] = array( | |
'name' => 'RSS', | |
'icon_url' => '/wp-content/plugins/add-to-any/icons/rss.svg', | |
'icon_width' => 32, | |
'icon_height' => 32, | |
'href' => '[INCLUDE YOUR RSS FEED URL HERE]', | |
); | |
return $services; | |
} | |
add_filter( 'A2A_SHARE_SAVE_services', 'addtoany_add_share_services', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample output here: