Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Add Email This Option to Your WordPress Posts

Last updated on by
Elegant Themes
How to Add Email This Option to Your WordPress Posts

Word of Mouth advertising is one of the techniques that provide very good results. We have seen twitter to help brands get more exposure. But one of the ways you can encourage your users to recommend your articles is by adding an Email This option to your WordPress Posts. WordPress has a plugin called WP-Email that gives your user an ability to share the post with their friends via an email.

You must download and activate the plugin. Once the plugin is activated you need to go head to:

WP-Admin > Settings > Permalinks

And hit save changes. You must do that in order to regenerate permalinks. You don’t need to change settings, you can leave your default permalink structure and just save. (Check out an article about SEO Friendly Permalink Structure in WordPress)

Once you have done that you need to go and modify the plugin settings.

WP-Email Settings

Next you will need to edit one of the following files: page.php, single.php, loop.php, post.php

Find the following code:

<?php while (have_posts()) : the_post(); ?>gt

Then in that loop, you must paste the following code:

<?php if(function_exists('wp_email')) { email_link(); } ?>

If you DO NOT want the email link to appear in every post/page, DO NOT use the code above. Just type in [email_link] into the selected post/page content and it will embed the email link into that post/page only.

You can show the email stats such as most emailed posts and total emailed posts using the widgets if your template has those available.

You can also use the Usage page of this plugin to get the codes to display the stats directly.

WP-Email


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »

Comments

  1. will says:

    tryed tons of other stuff they didn’t work thanks so much.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.