How to Add a Signature to Your WordPress Blog Posts

 

 

UPDATE

For Genesis 2.0 and WordPress 3.6 or higher, use this code instead

// Add Signature Image after single post
add_action('genesis_entry_footer', 'custom_include_signature', 1); 
function custom_include_signature() {
    if(is_single()) { ?>
    <img src="http://prettydarncute.com/demos/modernbloggerpro/wp-content/uploads/2013/08/Lindsey.png" alt="Signature" />
<?php }}

 

This tutorial is only compatible with sites currently using the Genesis framework from StudioPress.com. If you’re using either of Pretty Darn Cute Design’s Premade Themes, this will work like a charm for you. It’s pretty simple :)

  • Create your signature image
  • Upload your signature image via your media library
  • Copy the url
  • Paste it into the following code where it says “IMAGE URL HERE”
  • // Add Signature Image after single post
    add_action('genesis_after_post_content', 'custom_include_signature', 1); 
    function custom_include_signature() {
        if(is_single()) { ?>
        <img src="IMAGE URL HERE" alt="Signature" />
    <?php }}
  • Paste the entire code into your functions file, functions.php
  • My final product

    // Add Signature Image after single post
    add_action('genesis_after_post_content', 'custom_include_signature', 1); 
    function custom_include_signature() {
        if(is_single()) { ?>
        <img src="http://demos.prettydarncute.com/modern_blogger/wp-content/uploads/2011/10/signature1.png" alt="Signature" />
    <?php }}
    

    Scroll down to the end of the post on this modern blogger demo to see it in action:
    http://prettydarncute.com/demos/modern_blogger/?p=116


    Comments

    1. 1

      Very nice guide, thanks for sharing it :)

    2. 4

      I can`t seem to find the spot where to paste the code. Any help…

      Thanks!

    3. 7

      Hi! Thanks for this post! I love the style of your post content archives on your main blog page. Would you consider doing a tutorial for them?

    4. 10

      Hi Lindsay

      Does this work on all themes ? I’m using Luscious and followed your tutorial, but my signature is not showing up.

      • 11
        Lindsey says:

        Hi Carolyn! It should work on all themes. I’m not familiar with Luscious, there may be a conflict in the functions file?

    5. 12
      Kerry says:

      Hi! I hope you can help. I followed all the steps and have sucessfully overwritten the old functions file, but I seem to not have the correct url of my signature image. Seems pretty simple but what I did isn’t working. I store all of my custom files right in with the adorable theme images. I would really appreciate your help in figuring out the html to insert. Thanks!!

      • 13
        Lindsey says:

        It’s best to upload it via your media library in your dashboard for this. I just followed the tutorial on the adorable demo and the signature is appearing.

        • 14
          Kerry says:

          Works! Learning something new on Genesis every day! Thank you so much for your quick reply.

          • 15
            Lindsey says:

            Wonderful! No problem :) I’m glad to hear that! Genesis is amazing, and actually pretty fun to learn.

    6. 16

      Thanks for this tip, Lindsey – I’m a new Modern Blogger theme owner, and am still customizing my site. A post signature is definitely something I will want!

      • 17

        Yikes! I just created the signature, and added it to my blog, but I think I screwed up something in my functions.php file, because now my blog pages have the chevron (modern blogger theme) all the way across the screen…

        • 18
          Lindsey says:

          I apologize for just now replying to this, but it looks like you’ve got it up and running correctly :) Your site looks fab!

    7. 19

      Perfect! Just added mine :) Thanks so much!

    8. 21

      Hi Lindsey,

      Great tutorial! I need to take it a step further for a current project I’m working on: it’s a blog that features lots of guest bloggers, and I only want the post signature to show up for the main author of the blog – I thought I could add a conditional statement for if the author is an admin in WordPress. The code you listed above works great…but when I try to add the additional statement, the post signature doesn’t appear anymore. Here’s what I’m doing:

      add_action(‘genesis_after_post_content’, ‘custom_include_signature’, 1);
      function custom_include_signature() {
      $var = get_the_author_meta(‘user_level’);
      if(is_single() && ($var == 1)) { ?>

      <?php }}

      Any ideas?
      Any ideas?

      • 22

        Ugh – the comment cut out a little snippet of code: the insertion of the image. It *does* appear in the code I’m working with. :)

    9. 23

      Hi! Thanks for this tutorial! I do have a few issues maybe you can help me with. The signature ends up beneath the Relates Posts list after my blog posts and it keeps the default border around the signature.

      Any thoughts?

      Thanks!

    10. 24

      This will be so helpful because my Mom and I write our blog together. I know that at the top it says who the author is but I’m not sure if the readers recognize that. It will be nice to add some personality to our signatures and distinguish our posts in that way as well.

    11. 25

      How can this be done with multiple authors? I cannot find a good plugin that works AND has multiple authors anywhere

      • 26
        Lindsey says:

        I would just use the author box for those instances. You can find this option under “Users” select the user and check the box next to “Enable Author Box on this User’s Posts?” and save :)

    12. 27

      Just what I was looking for!! Thank you so much for the easy to understand (and implement!) code and directions :)

    13. 28

      Thanks for posting! Going to try it right now!

    14. 29

      Hi Lindsey,

      I wonder if you can help me with some code. I have a client who has come to me wanting me to add a signature under her posts, but not under her guest posts.

      She is using this tag to add a signature under all posts on WordPress (not Genesis):

      Signature text is here…

      It works on the site at present, but she would like to exclude that signature from showing up on her guest posts…which is understandable.

      She has already tried this for example:

      Signature text is here…

      …but then the signature doesn’t show at all on her own posts.

      Do you know the line of code or have any ideas?

      If so that would be wonderful!

    15. 31

      Hi Lindsay,

      Thanks so much for this! I’m using it with the Modern Blogger theme (which i love by the way! Still trying to learn to customise it properly but I’m getting there!)

      However, the signature is appearing BELOW my share buttons which looks a bit unusual. Is there a way around this at all?

      Thanks! :)
      Karen x

    16. 32

      I am trying to add my signature following these instructions . I went to appearance, editor and then to my functions.php. and added the code you gave us with the link to my picture included. I updated and didn’t see my signature. Can you help me to know what I may be doing incorrectly? Thanks!

      • 33
        Lindsey says:

        This is usually an error in the image path, just be sure the image url is inserted correctly and the original code is in tact :)

    17. 34

      Thanks for you nice clear tutorials.

    18. 37

      instead of doing an image under posts, could you do something like this instead?

      http://farm9.staticflickr.com/8262/8666089685_1b84eb4f70_b_d.jpg

      i’ve been looking all over and can’t find anything.

      thanks,
      john

    19. 39

      Hi there- thanks for the advice. Where exactly in my Genesis theme is the function.php file? Am I missing it? I’d love to add the code for a signature. Thanks! Love your site!

    20. 40

      Hi Lindsey,

      Thanks for this, it is exactly what I needed!

      The only issue I’m having is the signature is displaying below the Jetpack share icons so it looks bad as it needs to be right after the post above the share buttons.

      I tried changing the hook and replacing with a few other hooks but nothing seemed to work.

      Do you know how I can get the signature to display above the share buttons, directly below the post?

      Here is a page on a test site I’m working on so you can see what I mean:

      http://blogaholictest.com/blog/2013/03/13/224/

      Thanks so much!

    21. 41

      Thanks for your tutorial, it was really helpful, I implemented in my site MFIBLOGGER. It run on generate template. But the only thing this: there seem to be a lot of space between between the end of the post and the signature. ALthough I have resolved it. But Thanks for the guide..simple and straight to point.

    22. 42

      This tutorial seems pretty simple to follow how do I go about making a signature?

    23. 44

      Hi Lindsey!

      I have the Momprenuer theme, and when I add the code to my functions.php it crashes my site. I get the one line error code across the top of my site. :(

      Can you help me with this?

      Thank you,
      Stacy Molter

      • 45
        Lindsey says:

        Hi Stacy, this happens when you alter the existing code or do not copy the signature code correctly. I would try it again and be sure and leave the existing code untouched :)

    24. 48
      Adrienne Wilson says:

      I used the code to insert a blog signature. It worked awesomely! Is there a way to change the code to make the signature appear in the middle instead of the left side of my post?

    25. 50

      I have an image that is linked to my blog that I want to be able to give the code to so other people can copy and paste into their forum signatures or sites to help support my blog.

      So I made a text widget and put in the code:
      <pre><a href=”http://MYBLOG.com”><img style=”max-width: 800px;” src=”http://MY IMAGE Link.jpg” height=”125″ width=”333″ /></a></pre>

      The problem is, rather than giving the code, the widget ignores the <pre> and just shows the image. I tried this with the <code> tags too and that didn’t work either.

      Can anyone help with this? Is there maybe a plugin that fixes this problem? Thanks.

    26. 52

      Linsay if I ink the image file to my “Google Author” link – will Google read each post as mine? Or do I need to do this separately within each post?

    27. 54

      Hi,

      Sorry for asking such a basic questions, but

      1. Where should I add this code?

      2. Can I replace the

      with html and text to create a more general signature? In particular, I want to put the addthis sharing code, so that it is displayed straight after my post, rather than after the “you might also like”.

      Thanks

      anitamathias.com

      • 55
        Lindsey says:

        You add the code into your functions.php file :) And, yes, you can certainly use a text signature. I’m not familiar with the add this sharing code, but would definitely be careful when adding any code to your functions file. I would use a plugin and err on the side of caution.

    28. 56

      I used the code and it worked but I did not like it below other things I had on the posts, so I removed it. It crashed my site. I had copied what I removed so I could put it right back if it messed up. What I removed was ONLY the code for the signature (I doubled checked) but it sill crashed my site. What could be the issue???

    29. 57

      And I tried putting the code back but nope, that did not work either. Do I need to do a full restore from my server?

    30. 58

      I restored my site from a back up but how to I remove this code without crashing the site??
      Thanks in advance.

      • 59
        Lindsey says:

        Hi Pamela, It’s likely you may have either left a bracket or accidentally deleted part of another code.

    31. 60

      I used this and worked great. Only thing is put it below my share icons and related post. How can I get it above them.? I am using Lifestyle Pro Genesis Theme. http://lewislanedesigns.com/how-to-add-instagram-to-your-blog/

    32. 62

      I would love to use this, but am having the same issue as many others… with my signature showing up below my nRelate Posts + my Social Share Buttons!

      Is there a fix for this?

      Thanks! :)

    33. 64

      I tried this and now I can’t see my site! I put in the temp url and I cant see anything I went into the cpanel and found this does it explain anything and what do I do now please

      error_log
      ASCII text
      [06-Dec-2013 11:13:00 UTC] PHP Parse error: syntax error, unexpected ‘Signature’ (T_STRING) in /home2/doinduba/public_html/wp-content/themes/modernbloggerpro/functions.php on line 163
      [06-Dec-2013 11:13:23 UTC] PHP Parse error: syntax error, unexpected ‘Signature’ (T_STRING) in /home2/doinduba/public_html/wp-content/themes/modernbloggerpro/functions.php on line 163
      [06-Dec-2013 11:13:37 UTC] PHP Parse error: syntax error, unexpected ‘Signature’ (T_STRING) in /home2/doinduba/public_html/wp-content/themes/modernbloggerpro/functions.php on line 163

    34. 65

      I tried this and my signature is not showing up. I checked the functions php file and the code is in tere so I’m not sure what is wrong.

    35. 66

      Oh, no, I’m not sure what I did, but my website is giving me an error code:

      “Parse error: syntax error, unexpected ‘}’ in /home/content/43/12086243/html/wp-content/themes/modernbloggerpro/functions.php on line 157″

      I was being really careful when adding the code but now I worry that I messed up and deleted something. I’m really new at this and am not sure what to do.

      Help, please!

      Thank you.

      Patty

    36. 67

      Great tutorial! I am looking to add a border image to the end of my post, would this tutorial work? I would like at the end of the entire post, even after the social sharing buttons and my comments. What hook would I use?

    37. 68

      I’m brand new to blogging and I don’t even knoe where to look for the functions file I’m on word press don’t even know what version..any help?

      • 69
        Lindsey says:

        Hi Kt! You will want to log into your dashboard and then click “appearance” and then edit. You will then see functions.php on the right side of your screen. Be super careful editing this file, and definitely shoot us a support ticket if you have any trouble or would like to hire us to modify it for you. Keep a backup copy just in case you accidentally delete anything.

    38. 70

      I saw your post and know that you’ve updated it. However, even with the latest code (which is at the top), I can’t seem to get it to appear. I’ve copied the code exactly. Obviously, I must be doing something wrong. I’m running, Genesis 2.2.2 and WordPress 3.6. Also, if this helps, I added it to the child theme’s function php file. Should it have been the Genesis php?

      Can you assist?

      • 71
        Lindsey says:

        Hi Kathy! It looks like you’re using an older theme, so the original code may work best for you. Try that and let me know!

      • 72

        I’m having the same issue – tried both codes and nada! I’ll keep on tinkering, though.

    39. 73

      A new plugin has been added to the WordPress directory. You can use it to create a form, a signature or just add some text at the end of each post using html and javascript through this plugin.

      Here is the link given to the plugin:
      http://wordpress.org/plugins/after-post-manager/

    40. 74
      Scot C. Morgan says:

      Thanks for this quick tip. I just used it with success on the Beautiful Pro Genesis theme.

    41. 76

      Hi Lindsey, is it possible something was changed? Instead of the code above, my screen is showing the image of your signature. It might be my browser?

      I’ve used this tutorial before and just came back to use it again and it doesn’t look right. Thanks!

      • 77
        Lindsey says:

        I think you caught the post the very second I disabled a plugin that made the code visible, try it now :)

      • 78
        Lindsey says:

        Love your site! Just a tip, if you want to show full posts then go ahead and disable “show featured image” under genesis > Theme Settings Excerpts :)

    42. 79

      I don’t see an IMAGE URL HERE?

      http://grab.by/GqCO

      Where does it go?

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>