WordPress Signatures: Adding signatures to your blog posts

24 / Sep / 2012 by Roni C. Thomas 0 comments

The number of blogs on our website have seen a significant rise in the recent times and it became somewhat of a necessity to have the functionality of adding user-specific signatures akin to email signatures. It eliminated the process of individually adding signatures to each blog post allowing authors to skip the signature part.

 

For this purpose, I found a WordPress plugin called “WP Post Signature” by Soli that allowed me to do exactly this. But the problem was that it supported WordPress version 3.0+ and we were still using version 2.9.2. So whenever I tried using the plugin and added a signature, my blog post wouldn’t show up.

 

Taking a look at the apache logs, I found that the problem was that the plugin was using two methods that were not yet available in version 2.9.2 – get_site_url() and get_home_url(). So I edited the main plugin file which was adding the necessary filter hook – it appended the signature to the blog post whenever it was being viewed. I simply removed the lines at which these methods were being called, which seemed to be the simplest solution at the time. This ensured that the plugin was working with my version of WordPress. Problem solved.

 

I also added another option where you could say that your signature be applied to all your posts or only to new ones. This kept the signatures on old blogs intact and appended the signature to only new blogs. For this, I needed to save the time at which the settings were changed. After that, it was a simple check in the filter hook between the post date and setting change date to decide if my signature would be shown or not.

 

All credits for the plugin belong to the author. I just edited the plugin according to my needs.

 

Tag -

FOUND THIS USEFUL? SHARE IT

Leave a comment -