WordPress Post Signature

February 18th, 2013 by Kristy Leave a reply »

Thanks to a post on wpmu.org I found how to add a signature to a WordPress post by adding script in the functions.php file.

 

add_filter('the_content','add_signature');
function add_signature($text) {

global $post;

if($post->post_type == 'post') $text .= '<div class="signature">
<img src="http:/yoursite.com/wp-content/themes/yourtheme/images/signature.png" alt="signature" />
</div>';

return $text;
}

They also suggested the following if you need to tweak the placement of the signature.

div.signature img {
padding: 5px;
}
signature
Advertisement

Comments are closed.