Skip to content

Instantly share code, notes, and snippets.

@indeedably
Last active September 5, 2018 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indeedably/5aaddc8124b39299246c7cbd4d26cf30 to your computer and use it in GitHub Desktop.
Save indeedably/5aaddc8124b39299246c7cbd4d26cf30 to your computer and use it in GitHub Desktop.
How to add RSS feed to Wordpress AddToAny plugin
/*
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 );
@indeedably
Copy link
Author

Sample output here:
how to rss feed to wordpress addtoany plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment