Did you ever want to add a handwritten signature to your posts just like you would when signing a letter? Here’s a nice code snippet to create a “signature” shortcode.

First, you have to get a signature image. To do so, scan your signature or create one using your favorite photo editor. Once you have it, name it signature.jpg and upload it into your wp-content/themes/yourtheme/images directory.

Then, open the functions.php file from within your theme. If your theme doesn’t have that file, just create it. Paste the following code in it:

function sc_signature() {
   return '<div id="signature"></div>';
}
add_shortcode('signature', 'sc_signature');

Last, define the style for the #signature id by adding the following code to your style.css:

#signature {
background:url(images/signature.jpg) no-repeat top left;
width:100px;
height:100px;
}

Note: You may have to edit the width and height to fit your image size.

Now, when you’ll want to insert your signature at the end of a post, simply switch WordPress editor to HTML mode and type the following:

[signature]

Here it is in action…
[wfsignature]