Code, Plugins, Strategy, Wordpress

Adding ‘Email Post’ Without a Plugin

Posted by John Saddington on Apr 23, 2009

emailthisAnd yet another great and simple hack that will make you smile!

This is how I create the simple “Email Post” functionality on every single post dynamically without a plugin.

Super easy and super effective!

My reason behind this was simple: More than a few people have told me they’ve emailed the post to friends, staff, and others and I thought that in my redesign I should make it even easier for them.

What it does is simply boot up the user’s email client (like Apple Mail) and auto populate the Subject: and also provides the link in the body.

Superb!

emailthispost

Here’s my code:
<a href="mailto:?subject=<?php the_title(); ?> - From ChurchCrunch.com&amp;body=<?php the_permalink() ?>" title="Email this Post to a Friend!">Email Post</a>

  • Buzz it!
  • Bookmark and Share

John Saddington

John is the Chief Editor @ The 8BIT Network and Senior Blog Junkie here at ChurchCrunch.He enjoys Triple-Tall Americanos, developing Wordpress Themes, and a few other Random Things.

Leave a Reply

11 Responses to “Adding ‘Email Post’ Without a Plugin”

  1. Thanks so much for sharing these pieces of code with us! By sharing your expertise in this area, you are allowing us to all do things better!

  2. Are you literally putting them in the post html on every post or building it in so it is in every post?

    • every post. single.php in the loop.

      • You win. I think today is the day I actually figure out how my blog works. Here goes nothing.

        • And I broke it… but then I fixed it! This coding stuff is easy! errr….

  3. Thanks, John! I'd already swiped your code after you pointed out your method for creating the Tweet this link. :) Works like a charm!

  4. bahahaha~

  5. Thanks, John, for sharing your code. As I'm building my site it helps to see how the good ones code theirs! ;)

  6. it's not working right with my code. Can you give me some HTML/php help. I want it on the left side on the same line as the comments and catagories. It's not going there tough.

  7. BdA9eZ tegeailqpddg, [url=http://dktsmmdschxv.com/]dktsmmdschxv[/url], [link=http://lkdjdjmchdyi.com/]lkdjdjmchdyi[/link], http://wphperutyplg.com/

  1. Blogging Tips: SOB's Top 5 Wordpress Plug-in Alternatives: Reduce Server Load & Site Loading Time by Strictly Online Biz Inc.

    [...] Post</a>. Do remember to change From ChurchCrunch.com to your own site. Thanks to Church Crunch for this tip.Tweet This Plug-in Alternative: Simply add this code <a rel=”nofollow” [...]