Posted By

gd6d on 06/05/10


Tagged

image wordpress signature shortcode


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

xxxevilgrinxxx
d55beck
laurentzziu


Create a handwritten signature with a WordPress shortcode


 / Published in: PHP
 

URL: http://www.wefixwp.com/create-a-handwritten-signature-with-a-wordpress-shortcode/

  1. function sc_signature() {
  2. return '<div id="signature"></div>';
  3. }
  4. add_shortcode('signature', 'sc_signature');
  5.  
  6. Last, define the style for the #signature id by adding the following code to your style.css:
  7.  
  8. #signature {
  9. background:url(images/signature.jpg) no-repeat top left;
  10. width:100px;
  11. height:100px;
  12. }
  13.  
  14. Note: You may have to edit the width and height to fit your image size.
  15.  
  16. 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:
  17.  
  18. [signature]

Report this snippet  

You need to login to post a comment.