How To Add Signature To Posts Without A Plugin? (41 posts)

  1. Shan
    Posted 3 years ago #

    Well the plugin loaded fine with no errors.

    But I have no siggy, just this:


  2. The plugin is working (looks like) but the image file is missing.

    Try creating this JPG file at this location:


    If that works, then make that new wp-content/themes/wp-ellie/images/signature.png and modify the plugin from signature.jpg to signature.png

  3. Shan
    Posted 3 years ago #

    It's still not working. Is it my theme?

    Should I maybe put the file in it's own folder like the other plugins have? Right now it's just a free php script.

  4. Looks like the code is no longer there on your site. Did you deactivate the plugin?

    Before, this was being referenced but now it's not in the HTML.


    That didn't actually load so I thought the file was missing. For the signature to be displayed, that image needs to exist.

    Now the HTML code isn't there anymore.

    Should I maybe put the file in it's own folder like the other plugins have? Right now it's just a free php script.

    As long shan-signature.php in the wp-content/plugins directory somewhere, it should be fine. All of my hand made plugins are not in a seperate folder.

  5. Shan
    Posted 3 years ago #

    No, the plugin is active.

    Remember when I told you that code hates me? Yeah, there it is. lOL

  6. Shan
    Posted 3 years ago #

    Do you want me to give you access to my blog?

  7. Nope! Sorry, but support via this forum is all I can provide and I don't work on other people's installations (for many valid reasons including work related).

    Your WordPress installation is functioning (thankfully!) and it's just getting this add-on that's not working. There maybe a plugin in the plugin repo that can do this for you and if you find one, that probably is the way to go.

  8. Shan
    Posted 3 years ago #

    I understand. I do appreciate all the help you've given me.

    And I did have a plugin that worked OK, but I'm trying to reduce the plugins I have, hence the hardcode.

  9. Shan
    Posted 3 years ago #

    But here's what I don't get:

    Why does this code work:

    add_filter( 'the_content' , 'add_signature' , 1 ); function add_signature($text) { global $post; if($post->post_type == 'post') $text .= '<div class="signature"> <center><img src="http://lastshredsofsanity.com/wp-content/uploads/2012/02/ShanSig.png" alt="signature" /></center> </div>'; return $text; }

    But the code pulling the image this way doesn't:


    It's essentially the same code, right?

  10. Sure is. The only difference is that the code above is hard coded with that image URL.


    The one I suggested would have gotten the image from the theme directory.

    get_stylesheet_directory_uri() . '/images/signature.jpg

    If hard coding the image works, I'd stick with that one. Why mess with what works? :)

  11. Shan
    Posted 3 years ago #

    Was I supposed to add something to my stylesheet? Could that be the missing step? yes, it bugs me when something should work but doesn't. I go into detective mode and spend way too much time trying to figure it out. LOL

    The only issue I have now is that the code that works has now made my social media icons go below my related posts. And I think that's what started this whole thing. LOL

Topic Closed

This topic has been closed to new replies.

About this Topic