How to Add a Signature to Your WordPress Blog Posts

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

      • 10

        Lindsey says:

        August 29, 2012 at 3:20 pm

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

    1. 11

      Kerry says:

      August 30, 2012 at 3:47 pm

      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!!

      • 12

        Lindsey says:

        August 30, 2012 at 4:28 pm

        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.

        • 17

          Lindsey says:

          October 24, 2012 at 3:38 pm

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

    2. 20

      Jeni says:

      October 24, 2012 at 9:31 pm

      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?

      • 21

        Jeni says:

        October 24, 2012 at 9:34 pm

        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. :)

    3. 22

      Ash says:

      November 2, 2012 at 1:36 pm

      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!

    4. 23

      lesley says:

      November 15, 2012 at 12:12 pm

      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.

      • 25

        Lindsey says:

        December 3, 2012 at 10:21 am

        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 :)

    5. 28

      Susan O'Dea says:

      December 20, 2012 at 9:32 pm

      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!

    6. 30

      Karen says:

      January 25, 2013 at 9:08 am

      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

    7. 31

      Lisa T. King says:

      March 21, 2013 at 8:36 am

      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!

      • 32

        Lindsey says:

        April 21, 2013 at 9:15 am

        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 :)

    8. 38

      jen reyneri says:

      May 18, 2013 at 8:11 pm

      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!

    9. 39

      Emily says:

      May 29, 2013 at 12:09 pm

      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!

    10. 40

      Mark says:

      May 31, 2013 at 7:30 am

      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.

    11. 43

      Stacy Molter says:

      June 14, 2013 at 10:35 am

      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

      • 44

        Lindsey says:

        June 14, 2013 at 11:13 am

        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 :)

    Trackbacks

    1. [...] Source: Prettydarncute.com [...]

    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>