Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.3   Updated Saturday, September 22nd, 2007 at 7:19pm

Add Signature Plugin for WordPress

This plugin lets you display a custom signature at the bottom of your posts. Simply type the text you want in the options page and configure it to display on every post, or manually display it by adding the trigger text wherever you like. You can also add in author information using the included variables - login name, first name, last name, nickname, email address, website, and description/bio. It get this information from the author’s account settings. It currently supports up to three different signature templates.

Download

Instructions

  • Download the above file, rename it from .txt to .php, and upload it to your plugins directory.
  • Enable the plugin.
  • Configure the plugin options (under DDAddSig).
  • Test it out by viewing a post.

Change Log

  • 09-22-07 Version 1.3 - Added two extra signature fields. Added ‘Load Default Options’ button. Added option to display signature on search pages.
  • 11-27-06 Version 1.2 - Added option to show the signature on date/category archive pages.
  • 07-26-06 Version 1.1 - You can now choose to show the signature on the index, posts, and/or pages.
  • 07-23-06 Version 1.0 - First release.

Signatures

You can use HTML and CSS in your signatures. The following variables can also be used to display author information (they are case-sensitive):

  • %LOGIN% - Login name
  • %FIRST% - First name
  • %LAST% - Last name
  • %NICK% - Nickname
  • %EMAIL% - Email address
  • %URL% - Website
  • %DESC% - Description/Bio

Standard Usage

To show the signature on a post or page, simply type in the proper trigger text.

Primary signature:
<!-- ddsig -->

Signature 2:
<!-- ddsig2 -->

Signature 3:
<!-- ddsig3 -->

Note: Be sure you enter the trigger text using the ‘Code View’ in WordPress - not the new visual text editor.

Automatic Usage

If you prefer, you can have the plugin automatically display the signature on the pages you specify with the options below. Note: These options only apply to the primary signature.

Display on index page
When enabled, this option will show the signature after each post on your index page.

Display on posts
When enabled, this option will show the signature on each single post page.

Display on static pages
When enabled, this option will show the signature on each static page.

Display on archive pages
When enabled, this option will show the signature on each archive page. This includes both date and category archives.

Display on search pages
When enabled, this option will show the signature on each search results page.

Other Uses

What if you want to show an image of the author at the bottom of the posts? Standard WordPress profiles do not include an option for an author image, but it is easy to do with this plugin.

Just add something like this to your signature field:

<img src="/authors/%NICK%.jpg" />

Then all you have to do is create an ‘authors’ directory on your server, containing an image for each author (with their nickname for the filename).

  1. 109
    DougD

    Hi,
    I’ve used dd-add-sig.php for Wordpress releases below 2.6 and it’s been great, but is there one that will work with 2.6? I can’t find the “Options” button anymore.

    Thanks!
    Doug

  2. Great plugin - just what I was looking for to add an easy link to a charity website to every post so that wherever you read it - my page or an RSS feed - the link is there as reminder to click on and donate.
    Cheers!

  3. The signature works fine for my 2.5.1 WP blog. Unfortunately, I’m trying to add HR tags into it and it won’t show up, but I’ll figure it out on my own probably. Thanks for the simple plug-in.

  4. Can you have more than 3 sigs?

  5. iDARv8 Blogs rating, add your blog to be rated for free:
    http://blogsrate.net

  6. 104
    simson

    doesnt work with wp2.5.1. it breaks the whole template. the signature appears in the sidebar and in the post.

  7. well i can`t make it work automatically to add a signature , i don`t know why :((

  8. Thanks for the plugin. It works like a charm. It will be nice if there is a hack to make it work inside the template and switch it on and off accordingly.

  9. I am wondering how I can change the plugin so that the signature is placed at the TOP of a post (reight before the post) rather than at the end?

    Thanks for any help you can provide.

  10. 100
    Gabriel

    Hi exelent Plugin, I am from Argentina, My english is a lit bit bad.
    I want to put the signature in the comments. Is iT Possible? And One Signature per User Registered.
    Thanks-

  11. 99
    WPnoob

    I’m new to wordpress and can’t figure this plugin out. I installed it and it shows as a plugin in WP, and also shows as activated. However, I can’t get it to DO anything. If I add to a post, that literal text gets added to the post. What am I doing wrong??

  12. sorry to duplicate. I forgot the code tag…

    Why isn’t this working? I want to use the photo file that is already upload and associated with their user profile.

    
    <img src="/public_html/blog/wp-content/uploads/userphoto/%NICK%.jpg" />
    

    I actually wanted to insert the thumbnail, so I put .thumbnail.jpg
    but whether or not I want to do it with the thumbnail, I cannot get this to work.

    As a suggestion, it would be great if you had a tag just to use the photo that is uploaded for each user profile, instead of suggesting we create a new directory.

    Very useful plugin. I have been using it for a while, but could never figure out the photo part.

  13. Why isn’t this working?

    I actually wanted to insert the thumbnail, so I put .thumbnail.jpg
    but whether or not I want to do it with the thumbnail, I cannot get this to work.

  14. hi.
    thx for this great plugin :-)
    Is it possible to add the signature NOT too all post? i want it just for posts in certain categories. I allready have templates for these posts, but who do i insert the code ?
    thx a lot!

  15. Dear Dagon,
    excellent plugin! Thank you.

    I sometimes split longer posts into multiple pages (by using the wp ‘nextpage’ tag). Is there a way for the sig not to appear at the bottom of all of them, but only in the last one?

  16. Hello Alastair,

    I love your DD Add Signature Plugin and we use it on our Foliovision website to add author headshots to every article.

    Unfortunately it seems to have problems with forms, i.e. a form makes the signature appear twice. I’ve documented the issue here: DD Add Signature Plugin: Trouble with Technology. Perhaps you could let me know if you have any suggestions or workarounds.

  17. I would like to add content to every post made on blog by feedwordpress. Something like: This article does not reflect the opinions of myblog.com… Is it possible and how?

  18. 92
    Samuel Agboola

    Can this plugin be modified to insert the signature in-line with the text? I want to add a signature that is literally the last characters of the last line of every post. I could do it manually but it’d mean a lot of silly cutting and pasting. If I remove the tags, using WPAUTOP, the whole post formatting breaks down.

  19. I could not get sigs 2 and 3 to output. I went through the code and hacked it to get it to work for sigs 2 and 3. I’ll be happy to share the hacks, if interested.

  20. Great suggestion to make it work with roles.

  21. 89
    ovidiu

    can this be coupled with a role - ? my editors do not havbe the edit options role, so they cannot alter any option… maybe this signature should be specific for every user? and maybe be placed under the member section in the backend?

    Just a bunch of suggestions.
    regards
    Ovidiu

  22. Awesome plugin!! I’m using it on my writing community! :D

  23. Great plugin, saves a lot of time ;)

    Just one question… How can I add a new %TAG% to display the post title?

    The %URL% tag includes the post url, which is good. But I would like to also display the post title instead of a single generic anchor text on all posts.

    Thanks
    Neil

  24. %LOGIN% < what is the variable for the login id number? what would it be? %loginid%?

  25. 85
    Laarni

    Do you have more plugins for group blog wordpress? Thank you. I used this plugin for my group blog and everybody loves it.

  26. Any chance of running a slight mod and having the post’s comments run in the signature area? How would I accomplish that?

  27. I feel stupid, I don’t understand how to get this to work! :(

  28. Version 1.3 has been released

    Two extra signature fields have been added, as well as an option to display the signature on search pages, and a ‘load default options’ button.

    The documentation has been rewritten a bit to reflect the new changes, be sure to give it a read.

  29. 81
    Simon

    Just following on from my last post. I missed the link in the options page. Apologies for being dumb.

  30. 80
    Simon

    Like Pablo above post 70, I’m having a problem changing the ‘written by’ and ‘visit website’ - changed all references to these phrases in my dd-add-sig.php file, but that wording and the visit website link still appear ? I’m running wordpress 2.2 on Apache 2.2.4, with php 4.4.6.

    Quite frustrated… : )

  31. Is it possible to add an option so that it’ll display the signature on the pages returned after searches?

  32. marco: To hide the sig if it is a particular author, find this line:

    $a_login = get_the_author_login();

    And after it, add this:

    if ($a_login == 'authorlogin') return $content;

    That will cause the plugin to stop if it encounters that name. To do the reverse, you could use != (not equal).

  33. is it possible to say “view the signature if the author is xxx and don’t view the signature if the author is NOT xxx?”
    thanks so much!

  34. 76
    Wrhona

    Cool plugin! I’ve been searching for this. thanks a lot!

  35. I’ve extended the plugin a little bit in order to add a simple hook to the mygallery plugin extension. I added:

    
            $a_slug = sanitize_title(get_the_title());

    To the author information and

    
    	$the_sig = str_replace("%SLUG%", $a_slug, $the_sig);

    To the signature processor.

    Then, in the plugin admin page, I wrote [myflash=%SLUG%] - and was sure to create the image galleries with the same name as the post I was making, as MyGallery automatically “slug-ifys” titles.

  36. 74
    Matt

    Great plugin, worked first time with no effort! Using it on our company blog! Thank you very much!

  37. Abhishek: This plugin will only turn author nicknames into links if they are in a post or page - not in the template files directly.

  38. Works like a charm! Brilliant…What will you think of next…?

  39. I’ve installed your plugin and the code I use to get the author’s nickname on Wordpress 2.2 is “<?php the_author(); ?>” on revieware.net.

    It’s a multi-user blog and I just cant seem to find out why the popup link is not being generated. Would really appreciate some help here.
    Thanks,
    Abhishek

  40. no matter what i put in for ddsig_data, all i get on the site is “Written by - Visit Website”?

  41. Hi!
    Thanks for the information.
    I´ve tried that already, with “==” and “=”… and both cotes signs…
    What happens is that it makes any author to appear!
    :(

  42. Diego: That is not quite right. You need two equal signs, not just one, or it will set the value instead of comparing it in the IF statement. Setting a value always returns true, which is why it always just returns the post without adding in the signature :)

    Also, be sure to use normal single quotes around your login name (you may have already, but since you did not wrap code tags around that example, WordPress changed the quotes).

    Here is the proper code:

    $a_login = get_the_author_login(); // %LOGIN%
    if ($a_login == 'MYLOGIN') { return $content; }
    $a_first = get_the_author_firstname(); // %FIRST%

  43. Ups! It disn´t work! :(

    I put:

    // Get author information

    $a_login = get_the_author_login(); // %LOGIN%
    if ($a_login = ‘MYLOGIN’) { return $content; }
    $a_first = get_the_author_firstname(); // %FIRST%
    ……

    Any authors appeared anymore!

  44. So simple! Thanks!
    Your plugin is really wonderful! Thanks!!

    regards,

    Diego

  45. Diego: Sure. Just find this line in the script:

    $a_login = get_the_author_login();

    And after it, add this:

    if ($a_login == 'yourloginname') { return $content; }

    That will cause it to immediately exit the function when it sees that it is your login name :)

  46. Hi! First of all thanks for this amazing plugin! It´s just fabulous!
    But I need some help. I´m the Editor from a blog, and I have some other authors. I´ve installed the plugin, and after the post appears a little profile of each author and their pictures. BUt I´d like to DON´T show this profile on MY articles, only on the other authors. Is there a way to exclude an author on this plugin???

    Regards,

    Diego

  47. Edie: It sounds like you just need to use this WordPress function: http://codex.wordpress.org/Template_Tags/the_author

  48. I need help! I would like to insert author name into single.php, but when I insert it doesn’t work. What code am I insert into single.php?

  49. Thank you for this plugin. I use this add signature plugin. Cheers.

  50. [...] Add Signature,自动在每篇文章后添加预先设置的签名,有逛论坛习惯的朋友会有用。 上传激活。Options => DDAddSig中设置签名即可,如果有特殊需要可以直接使用<!– ddsig –>来调用。 [...]

  51. Hey, thanks for the download file. Grat work, guys. Jürgen :-)

  52. Great plugin. Makes it simple for members and visitors to get to know a little bit about the authors–and perhaps encourage authors to contribute more!

    Is there a way to automatically use a default image if the user hasn’t uploaded one?

    Right now I’m using Dan’s Avatar Thingy plugin to allow users to upload a picture in the profile. A default image is otherwised shown in comments. Currently, I am simply calling the avatar in at the end of the post under the signature. Would be nice if I could somehow do it as a part of the Add Signauture plugin (I tried but couldn’t get it to work)to have more control over where the picture falls in relationship to the signature.

    Thanks

  53. I don´t find the Plugin in my Plugin Overview in the Admin Section of Wordpress. Is this Plugin may be not compatible with the new version of wordpress?

  54. Jim: That is because there is no ‘author’ of the category pages - they are generated by WordPress. In order for this plugin to add the signature, it gets the author information from the current post/page being viewed. It will not work properly for generated pages such as category lists.

  55. Reference my previous post: What I should have said is that the %URL% on the category pages only, results in the proper text, but the link isn’t pulled nor live. All other page types are fine. Test site in website link above.

  56. 54
    Jim Kimmons

    Plugin showing up on all page types, as elected in setup. However, there is a link in the signature. For some reason, only on category pages, the link is dead.

  57. Donna: Absolutely.

  58. Does this work with multiple authors?

  59. [...]   Add Signature,自动在每篇文章后添加预先设置的签名,有逛论坛习惯的朋友会有用。   上传激活。Options => DDAddSig中设置签名即可。 Tags: post, signature [...]

  60. Cris: This plugin was not really designed to do that sort of thing. It could be done easily in your template files though with a little PHP. Contact me if you are interested in having this done.

  61. What if i want my sig to include my adsense code automatically?
    For example , I have 10 contributors to my blog and i’d like each one to automatically have their own adsense code appear in all their posts in their sigs…

    Possible?
    Thank you!

  62. Kris: I was not aware of any problems with this plugin in WordPress 2.1 - is it not working for you?

    (btw, the nofollow tag is added to URLs in comments - so it does not give you extra links ;) )

  63. I was looking for a wordpress signature plugin for one of my sites.
    At last I found one. Tx a lot.

  64. I love this plugin. But would like to have the updated version for wordpress2.1

  65. [...] herhangi birine, yada istediðiniz herhangi tek bir post’a/page’e imza ekler yükleme adresi: Add Signature Plugin for WordPress · Dagon Design kurulumu: gerekli bir ayar yok, yükleme adresindeki txt dosyasýna sað týklayýp farklý kaydetten [...]

  66. dirvish: It depends on what you are trying to do. This line in the plugin replaces the trigger text with the generated signature:

    $content = str_replace('<!-- ddsig -->', $the_sig, $content);

    So you could append the php/javascript you wanted to that variable, directly in the plugin file.

  67. Do you have any tips on modifying this to allow php or javascript?

  68. John: Not that I know of. I have not tested this one. I did upgrade all my WP sites, and I did not have any problems with the more popular plugins of mine anyway.

  69. 41
    John P

    Any problems running this with WordPress 2.1?

  70. Therseus: I am not sure what you mean. There should be no language-specific code in this plugin.

  71. i want to use a different language. How do i change the parameters of this plugin.

  72. CKS Chu: This plugin will not change the RSS feed at all. It basically just adds some extra info to the post right before it is sent to the browser. I am not even sure what would be involved in modifying it so that it would do this, as I have not experimented with modifying the output of the feeds themselves.

  73. Great, but how do I incorporate it into my RSS feed? I’d like that feature because we have multiple authors.

    Please let me know at http://www.clashbang.com

  74. StreetChariot: Well this plugin should not be modifying any thing in the post, except for putting the sig in where you specify. The user bio plugin does have a problem though in that it switches all references to the username to the link, which can affect things if the username is in an image link, or other link. I had mentioned this in the comments for that plugin. The current ‘fix’ is to modify the code which looks for the trigger text, configuring it to look for “%username%” instead of just “username”. This means that you would have to manually add the characters around the usernames you want converted to a link, but it prevents the other code from being modified. If you are not sure what I mean, email me.

  75. I am having problems using both your sig plugin and your bio plugin. Seems that the bio plugin grabs the %NICK% result (the username) and uses it to try and make a hyperlink, which makes the picture in each post not work. How do i keep this from happening?

  76. oh duh lol i see it right there in your post above

  77. I was wondering how you set it up so that if you have multiple people with administrative privileges when they post a message it puts their signature image on the bottom. Cause from what i understand it only allows you to put one signature no matter who the person is that is posting. I know they can override the original signature but is there a script that would just do it automatically?

    do you understand my question did i make it clear?

  78. Cool—I’ll give it a try. Thanks for the easy solution! -Jess

  79. Jesse: Ah, looking at your question again I somehow managed to completely miss the ‘multiple sigs’ part the first time ;)

    Well, one quick and easy method would be to run another copy of the plugin. To do this, a few things would need to be changed in the second copy, but if you do a search and replace (ddsig -> ddsig2) for the whole script, it should keep things separated properly :)

  80. Right, I understand that function… I am just looking for a way to handle the need for a second signature (for specific posts). Is there a method for doing this that I am missing? Thanks, Jess

  81. Jesse Siglow: If you enable the option, this plugin will automatically display the signature on the pages you want. This is mentioned above. The trigger text is meant for those who want to do it manually, or to over-write the setting for a particular post/page. :)

  82. HI there, GREAT plug-in that was definitely in need of release. I have a feature request/suggestion, so please take it as you may: how about having an option for multiple sigs? On my site, we occasionally post news, pr, etc. so it would be great to tag the sig as “posted by” rather than “written by” (but still be able to attribute to authors).

    I realize we can do it by adding in the <!-- ddsig --> by hand, but I am attempting to be as lazy as possible… :)

    Thanks for the great utility!

  83. j O i*: I will keep that in mind :) Glad it worked for you.

  84. Pure Genius comrad! ::Virtual Kiss:: As a gift if you ever require services from my company, let me know and I’ll give you a 20% discount.

  85. j O i*: I looked again and realized that the script (depending on the settings) showed the signature on posts, pages, and the index, but was not checking archive pages. I just uploaded version 1.2 which adds an option for archive pages - which includes both date-based and category archives :)

  86. Just as a footer. It appears on all pages except for the pages sorted by categories. The url is “theartfulbloggers.com/?cat=2″ I have multiple authors and desperately need to differentiate. Advise your thoughts.

  87. j O i*: It depends - where are you placing the trigger text within the post? Posts are displayed differently on different types of pages (index, archives, search, single post view).

  88. i find that the signature does not load when i sort posts by category - how can i adjust this?

  89. I test it Works for WordPress 2.0.5 Thank you

  90. Anthony: No, PHP would not be processed if you added it to the signature.

  91. Question, can you include php as part of the signature as well?

  92. 18
    Bravos

    Admin,
    My apologies. I haven’t done this before and completely lost the location of the options. I was looking under Plugins/Options as opposed to Options/Plugins.

    Sorted now, exactly what I was looking for.
    Thank you.

  93. Bravos: I cannot imagine why a plugin would just disappear. I have not ever heard of this happening with any plugin.

  94. Cancel my question about renaming. I found how to do it in my ftp software.

    However, activated, opened the Plugin admin page and set my signature - only included some standard text and a home page URL in html.
    tested with a blog post and no signature. Went back to Plugin admin and the plugin has disappeared from the toolbar.
    Deactivated, deleted from the folder and reloaded - no change.

    Any suggestions?

    Regards

  95. Simple question from a simple user.
    How do I rename to file with .php extension?
    I have tried Save Target as… and copied/pasted in to Notepad then renamed but both give me filename.php.txt.
    Regards

  96. 14
    web2

    Great Plugin!! How can I get the signature to work for the RSS feed??

  97. Puzzled: I will give my standard answer :) Try re-downloading the plugin, and if that does not work, try temporarily disabling your other plugins.

  98. 12
    Puzzled

    The following and similar errors show on plugin activation and when trying to edit a post:
    “Warning: Cannot modify header information - headers already sent by (output started at…”

  99. I tried to use the trigger <!-- ddsig --> but wasn’t working.

    After looking into the code I saw that $found_trigger from:

    if ($found_trigger) { 			// If trigger found, process
    		$content = str_replace('<!-- ddsig -->', $the_sig, $content);

    wasn’t defined and I replace it with $found because I saw above that this might be the condition.

    Now it is working nice.

  100. 10
    enrico

    hi

    id like to exclude the signature when a post is featured in a specific category.
    how can i do?

    pls let me know
    tnx
    enrico

  101. [...] Add Sig created by Admin: Add a custom signature to the bottom of posts with the author’s information. [...]

  102. [...] Add Sig - Add a custom signature to the bottom of posts with the author’s information. [...]

  103. Ge-Linkt 09-08-06…

    New Links / 09-08-06

    ……

  104. [...] Grab it from Dragon Design’s website. [...]

  105. [...] I didn’t see the point of this plugin (which adds an email-like sig to your posts) at first, unless you have a multi-author blog, but I reckon it would be a pretty useful thing to have in your RSS feed. This method could be adapted. [...]

  106. Version 1.1 has been released - It lets you choose what pages the signature is displayed on - the index, posts, and/or pages.

  107. [...]   Add signature,增加签名档在文章底部。 post signature [...]

  108. [...] Plugin-ul il gasiti aici. Posturi similare:Plugin-uri WordPress pe care la folosescHiQ pe blogMovable Type EnterpriseMarti il am invitat pe Jeremy Wright la Radio LynxCat de binevenit este un forum al bloggerilor? [...]

  109. [...] Grab it from Dragon Design’s website. [...]

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.