WordPress: Author Signature

Every post in my index page has a ‘xox Laura’ (before ‘Posted By *Ra’) image, some of you wondered how I did it. I’m sure there are other methods out there and maybe some plugins or easier ways but here how I make it.

:arrow: First of all make your image, then add this code in the loop…

<div class="author"></div>

:!:  with the new version of WP I had some difficulties so I changed the word “author” to another word (I personally used the Italian equivalent), if you change it remember to change it also later, in the next step  :!:

…after the post code which is:

<?php the_content(__('', '')); ?>

and before the loop end code which is:

<?php endif; ?>

:arrow: Now you need to style this class so open your style.css and write:

.author {
height: XXpx;
background: url('IMAGE URL') no-repeat left;
}

of course change ‘left’ to ‘right’ or ‘center’ if you want your sig elsewhere ;) the height is important because without it the div doesn’t have dimensions and doesn’t appear, obviously it’s the height of your image. IMAGE URL is where you have your theme images, usually it’s ‘images/author.jpg’.

Share On:
Post on TwitterPost on FacebookPost on WhatsappPost on Google+Post on LinkedinPost on DigPost on StumbleUpon

2 coffees on “WordPress: Author Signature

  1. Very good blog! Do you have any hints for aspiring writers?
    I’m hoping to start my own website soon but I’m a little lost on everything.

    Would you advise starting with a free platform like WordPress
    or go for a paid option? There are so many options out there
    that I’m totally confused .. Any recommendations?
    Thanks a lot!

    1. I would recommend WordPress as starter, maybe a domain and hosting but do it yourself if you understand the Web world a little bit. I learnt from scratch and if I can do what I’m doing today it’s thanks to my own will to learn.

Leave a Reply

Your email address will not be published. Required fields are marked *