Family Encyclopedia >> Electronics

How to Add Tumblr Share Button in WordPress

Like Facebook's Like button, Send button, Twitter's Retweet button, LinkedIn's Share button, Tumblr, a microblogging service, has launched its own share button. The purpose of this button is to make it easier for over 16 million Tumblr bloggers to promote your content on their blogs. This sharing widget allows Tumblr users to easily "Reblog" content found all over the web instead of just on Tumblr. This option is one of the key features behind the huge social aspect of Tumblr. In this article, we'll show you how to add the Tumblr Share button in WordPress.

Earlier when we wrote about the WordPress Post Formats that added microblogging functionalities to WordPress, we went into more detail about how this can allow WordPress to replace Tumblr for those users who want more control. Several users attacked us with email saying "WordPress doesn't allow you to have the social aspect that Tumblr does because it has a community of bloggers who are re-blogging your stuff." Well now you can have that feature in your WordPress posts.

How to Add Tumblr Share Button in WordPress

First open your footer.php file and paste this code just above the tag:

 

If you are using a framework and don't have access to the footer.php file, add this code in your functions.php file or custom functions area:

función insert_tumblr_script () echo ''; add_action ('wp_footer', 'insert_tumblr_script');

Once you've done that, let's take a look at how you can add the code inside your posts:

Basic version

To add the very basic version of the script that will suffice for most users, all you have to do is paste this code wherever you want in your loop, which can be found at (single.php, index.php , page.php, loop .php etc):

Compartir en Tumblr

You can have multiple versions of the shared image which can be found on the official Tumblr button page. Basically you can select the image you want and then paste the code from the basics. Alternatively, you can also put your own image to share by sharing the background:css in the code above.

Advanced customization

Now, as you know, with the use of WordPress post formats, we are now seeing versions of microblogging themes for WordPress. Well, in the basic version for the Tumblr button that we discussed earlier, it dynamically pulls the content. This can cause errors like the wrong title, wrong description, etc. Also, in the basic version, you don't choose the format (link, text, image, quote, video, etc.) for the Tumblr blogger, unlike the Re-Blog feature that is used in the Tumblr community.

So the Tumblr share button made sure to have advanced features built in that allow you to specify your post format by default, specify the pre-filled description, a specific pull quote (complete with attribution), and even paragraphs. specific to an article page. Here is an example of how you will add your loop.php file using WordPress post formats:

 if (has_post_format ('link') ?> Compartir en Tumblr Compartir en Tumblr  

To read more about customizations, check out the official Tumblr button page.

Will you be adding this button to your WordPress site?