I want to be able to add a signature to the end of all of my blog posts but NOT doing it manually. I would like it to just automatically show up below the post. What code and where do I put this? Please leave detailed instructions. Thanks!
I want to be able to add a signature to the end of all of my blog posts but NOT doing it manually. I would like it to just automatically show up below the post. What code and where do I put this? Please leave detailed instructions. Thanks!
Oh, sorry... my blog is http://brandisutherlin.com
can anyone help with this?
where exactly do you want the signature?
- after the content?
try to add a filter to functions.php of your theme; something like:
add_filter('the_content','add_signature');
function add_signature($text) {
global $post;
if($post->post_type == 'post') $text .= '<div class="signature">my signature text; could be a html image tag as well</div>';
return $text;
}
- after the line 'posted in:... '?
you would need to edit index.php and single.php (and the other template files where you want to have the signature; http://codex.wordpress.org/Template_Hierarchy )
find the line with 'endwhile;' of the loop;
add the signature code, for instance <div class="signature">my signature text; could be a html image tag as well</div>, just before this line.
always make a backup copy of your theme files before editing
http://codex.wordpress.org/The_Loop_in_Action
http://codex.wordpress.org/The_Loop
you can add formatting for the signature into style.css, for instance using the example code:
.signature { ... }
This topic has been closed to new replies.