We often find stories and interesting articles online which are worth sharing with friends. Mostly people never miss sharing product reviews, special discounts and offers on website. Tell a friend button  is used to share article with your friends by personal email. Tell a friend button is also known has Email This button, which is similar to share button like tweetmeme button, facebook like or linkedin.

tell-a-friend-on wordpress

Sharing something with Friend

There are many plugins made to add Email button on WordPress, but depending upon third party plugins for simple code is just waste of resources and increasing server load by php calls. In this article, we will learn how to add tell a friend button without plugin in WordPress blog.

Tell a Friend Button Code

The analogy behind is that on click of the button, it will open a default email software and will add subject, link of the article and will prompt to enter friend’s email address. Below is the Email button code for WordPress, and you add the code in single.php file.

Make sure you take full backup of single.php file using FTP before modifying it.

<a class="email-share" href="mailto:?subject=Check this out&BODY=I found this article interesting and thought of sharing it with you. Check it out: <?php the_permalink(); ?>" target="_blank"></a>

Once done editing the php file, now apply some CSS on it. Copy-Paste the below code snippet in style.css file.

background:url('images/email.png') no-repeat;
margin:10px 20px 10px 0;

Download the the following image, by right clicking and Save Image as.. “email.png”


Place the downloaded image in the Theme Directory as {theme folder}/images/email.png

We are done!

After adding all code snippets, refresh the website and open any blog post, and you can see the email button demo below:

Email button Demo:


On click of above button, it will send the link of this blog that is www.thecreatology.com to the email address you enter.

If you have any query or require further assistance, you can post comment as your feedback.