WordPress: Author Signature

Friday, March 6 2015 2:00 pm, GMT+1h Laura | 2 Comments

Every post in my index page has a ‘xox Laura’ (before ‘Posted By *Ra’) image, some of you wandered how I do 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(__('Read the rest of this entry &amp;amp;amp;amp;amp;amp;raquo;', '')); ?>

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’.

2 comments:

  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.

Comments are closed.