Swedish flagChinese (Simplified) flagEnglish flagGerman flagFrench flagSpanish flagHindi flag
January
25
2009

Edit Word Press theme

David Gustafsson
david@techonomics.se


A small ad on techonomics.se

I have added an author tag in my posts (↑). To do that, I could use my picture and e-mail directly, but I chose to make it more dynamic. On this page:

http://phpxref.ftwr.co.uk/wordpress/nav.html?_functions/index.html

you will find all the features that are predefined in WordPress. By taking advantage of this feature get_avatar seen get avatar image:

  <? Php
    echo get_avatar ($ id_or_email, $ size = '96 ', $ default =' <path_to_url> ');
    ?> 

To always be the author of the current post that get into the picture, I use the function

get_the_author_id ()

on-site for $ id_or_email.

To print the author's name and email also features get_author () and get_author_email (). Function Library is a gold mine to save time when you build your own theme / modify someone else's!

(The formatting of my author tag is then built using css that is added in style.css)

The theme is modified from Aeros 2.0 - Blogglista.se - Translation is made ​​by N2H