blog-How-to-add-a-signature-to-all-WordPress-posts-

How to add a signature to all WordPress posts

Posted on:

Having a custom signature at the end of your blog post adds a personal touch to your content. It’s also a great way to tie in the human element to your branding.

What can you add in your signature?

  • Your blog signature can be a scanned image of your actual signature. Or it can be your first name in a fancy script font. You can use a program like PicMonkey, Canva, or Photoshop to save the image as a PNG or an SVG. Eg: Fancy script font signature in Marie Forleo’s posts
  • It can be your nickname in the same font as the rest of your website content. Eg: Rebecca Tracey of Uncaged life signs of her blog posts as becca.
  • You can sign off your blog posts using your branding keywords such as “Xo, Love, Warm regards’. Eg: Jen Carrington signs off her emails and blog posts with “As always, I’m rooting for you”.
  • You can use a combination of the above to personalize your blog post. Eg: I sign off my blog posts with “Lets geek out together” and an image of my first name.

Now that we know what to add to the signature, let’s look at how we make this happen.

By default, WordPress doesn’t have an easy way to display a signature after your blog post. I’ll show you two easy ways you can do this in WordPress.

NOTE:

This tutorial will add a signature to ALL your posts, old and new. If you have already typed in a signature in your existing posts, your posts will show two signatures. The only workaround for this is to go back to your old posts and remove all the old signatures.

I think it’s worth the effort because going forward you’re going to have a shiny signature at the end of all your posts – new and old.

Two ways to add a signature to all your WordPress posts

Method 1 | Adding a WordPress signature using a plugin.

The easy way to add a signature to all your WordPress posts without tweaking code is to use a plugin. Go to Plugins – Add New, and search for Simple Drop Cap

To apply drop caps to every post, all you have to do is go to Plugins – Add new, and search for WP Post Signature.

After activating the plugin, go to Settings – WP Post Signature. You can customize the User Settings to work with your design. You can customize which posts, pages or catgories you want the signature displayed.

To add a custom image, you can add the following HTML in the first text area under User Settings.

// Replace src attribute with your website and image url details
<img src="http:/yoursite.com/wp-content/themes/yourtheme/images/signature.png" alt="signature" />
NOTE:
  • Plugins slow down your website. Hence I don’t recommend this approach for styling unless you don’t want to muck with code.

Method 2 | Adding a WordPress signature by editing the functions.php file.

  1. Open the functions.php file from your WordPress theme directory, in your text editor.
  2. Copy and Paste the code snippet below
  3. Replace the image location with the correct URL for where your signature image is located
  4. Make any other necessary tweaks to suit your needs and theme structure.
  5. Save and upload the functions.php to your theme directory.
/**
* Adding signature to the blog posts.
*/
function add_signature($text) {
global $post;
if($post->post_type == 'post') $text .= '<p><em>Lets geek out together,</em></p><p class="signature"><img src="/wp-content/themes/femscores/images/signature-femy.svg"></p>';
return $text;
}

add_filter('the_content','add_signature');

To add a text only signature, use the following code snippet.

function add_signature($text) {
global $post;
if($post->post_type == 'post') $text .= '<p class="signature">As always, I am rooting for you,<br>Jen</p>';
return $text;
}

add_filter('the_content','add_signature');

If you want to also add the signature at the end of pages and posts, you’ll add a condition to the IF statement. Replace the

if($post->post_type == 'post')

with

if(($post->post_type == 'post') || ($post->post_type == 'page'))

I’m signing off for now. I hope this article inspires you to create a custom signature to spruce up your posts.