WordPress Tutorial Add Social Buttons in RSS Feed

Adding social buttons to wordpress RSS feed is always good for SEO and it will increase your website visibility to other users. we have steps for adding social buttons to RSS feed.

How to Add Social Buttons in RSS Feed

Wordpress Tutorial Add Social Buttons in RSS Feed
WordPress Tutorial Add Social Buttons in RSS Feed

 

Why social share buttons are important in RSS feed.

RSS feed is super great feature for publishing news to multiple search engine and news site. Through RSS feed your website will viewable to many of people. You may be seen already, some of popular news and bigger websites are showing share buttons in RSS feed. So through RSS feed you can share your articles to social media sites.

 

Using following simple code snippet you can add RSS feed share buttons to wordpress RSS feed.

// add custom feed content
function wpapi_add_feed_content($content) {

// Check if a feed is requested
if(is_feed()) {

// Encoding post link for sharing
$permalink_encoded = urlencode(get_permalink());

// Getting post title for the tweet
$post_title = get_the_title();

// Content you want to display below each post
// This is where we will add our icons

$content .= '<p>
<a href="http://www.facebook.com/sharer/sharer.php?u=' . $permalink_encoded . '" title="Share on Facebook"><img src="http://images.purabtech.in/twitter-32x32.png" title="Share on Facebook" alt="Share on Facebook" width="64px" height="64px" /></a>

<a href="http://www.twitter.com/share?&text='. $post_title . '&amp;url=' . $permalink_encoded . '" title="Share on Twitter"><img src="http://images.purabtech.in/facebook-32x32.png" title="Share on Twitter" alt="Share on Twitter" width="64px" height="64px" /></a>
</p>';
}

return $content;
}

add_filter('the_excerpt_rss', 'wpapi_add_feed_content');
add_filter('the_content', 'wpapi_add_feed_content');

I Downloaded free share icons from following URL:
http://www.blogperfume.com/new-27-circular-social-media-icons-in-3-sizes/

Here in this example code we used facebook and twitter share buttons which are most popular social sites in the world.

how to limit number of wordpress posts in rss feed

As per wordpress pages, we can limit number of wordpress posts in rss feed. Through RSS feed (feedburner and other feeds) we can subscribe to any website. RSS feed need to managed properly and shown to user. Some client and webmaster want to show limited nuber of post to user in RSS feed view, It is encourage-able to visitors to view your site.

how to limit number of wordpress posts in rss feed

What you need is, First login to worpdress admin panel. Than go to Settings » Reading page in your WordPress admin dashboard menu (left side).

WordPress itself given you facility to control RSS feed post numbers through wordpress admin panel itself.

[viral-lock message=”Setting image is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]

limit number of wordpress posts in rss feed
how to limit number of wordpress posts in rss feed

[/viral-lock]

After this, Find ‘Syndication feeds show the most recent’  textbox option and change the value(number) which you want to be shown to user in RSS feed page.

You will find “For each article in a feed, show ” radio box there, Choose option what you want to show to user in RSS feed. We suggest you to use “Summary” because it will be good for SEO purpose. Than Just save the changes.

Than go to your RSS feed page. If you dont know RSS feed page than use following link. Do not forget to change the your domain name.

https://yourdomain.com/feed

Your RSS feed will look as follows:

how to limit number of wordpress posts in rss feed

Tutorial is done, Now you have successfully limited number of wordpress posts in rss feed for your wordpress website. You will like above tutorial which will tell you Add Feedburner RSS feed email subscription form in wordpress without plugin and If you want to show thumbnail in RSS feed then check above tutorial Show Post Thumbnail or Featured image in WordPress RSS Feed

Many Hacks Related to wordpress and RSS feed: WordPress and RSS feed Hacks