A client recently asked me if I could place her signature at the bottom of her blog posts. Surprisingly, this was the first time anyone had asked and my first attempt to do it. I went to Google and found several answers.
If you want to skip all the in between stuff on how I achieved the correct code, click here to jump right to it!
The first solution I found was to add this CSS to my style sheet:
It worked but, take a look. The Jetpack Share buttons are above the signature. The signature is not in the right place and it also shows up at the bottom of pages. Now, there was a three step solution to fixing this which required adding a plugin and other code to the functions file, but I didn’t want to do all of that.
So I searched again. This time, I found code which is to be placed in your functions.php file. Several people use this so I figured why not try it.
Once again, the Jetpack Share buttons are above the signature. Even changing the priority (the 1) to a higher number, the signature stayed in the same place. Not only that, the signature now appears on blog archive pages. If you use short codes on pages to present information such as a calendar, contact form, etc., the signature shows up below it instead of above it. Ughhhh, okay back to searching.
Three times a charm, I found the solution. Even though it’s from a post written in 2012 – it still worked. The following code works the way I want it to – on posts only, at the end of the content – before the Jetpack Share buttons and any other short code that we may be using. Thanks to WPBeginner for this code.
Now this is what it should look like.
So… to get your signature to look like that. Follow these instructions:
- Make a copy of your functions.php file before you start.
- Upload your signature using Media > Add New. Then grab the URL to that image.
- Copy the code in the last gist labeled “new signature” and paste it at the bottom of your functions.php file.
- In the area of the code that says, “Load Your Content Here” – you can change that to something like “Thanks for stopping by!” or “Have a Great Day!“.
- On the same line of that code, you will see the pound (#) sign. Replace the # with the URL of your signature image, then save it.