• I am currently designing a new theme for my blog and I have a number of differnet authors on the site. Therefore as well as displaying the authors name I would like to display an image of them to.

    What is the best way to do this?

    I have tried the User Photo plugin but just cannot get it to anything apart from uploada photo (and it seems I can not the only one).

    I have tried entering a URL of the image I want to use in the Authors About or Description box and then popping the function in an image tag but that doesn’t work either.

    Can it be done with the Authors gravatar?

    ANy help would be greatly appreciated. Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter educationthemes

    (@educationthemes)

    Well i have come up with a solution but it is not ideal. Here goes.

    Create a user photo and name it the users ID number and place it in your themes images folder.

    Then wherever you want to display the authors image use this code:

    <img src="<?php bloginfo('template_url'); ?>/images/authors/<?php the_author_ID(); ?>.jpg" alt="author image" />

    I stored my author images in my templates images folder and then inside a folder calledi authors.

Viewing 1 replies (of 1 total)
  • The topic ‘Author Photo in Template Files’ is closed to new replies.