Back to Blog

Showing Blog Author Images with WordPress

Author

For the EnerBLOG project EnerNOC wanted a way of managing and displaying profile pics for each author. The idea behind this was to give the blog a more personal feel. To accomplish this we used the User Photo plugin for WordPress.

User Photo Plugin for WordPress
User Photo Plugin for WordPress

This plugin allows users to upload their own photo. A thumbnail is automatically generated from the photo, and both files are stored in the /wp-content/uploads/ folder.

The next step is adding the code snippets to your WordPress template so that the thumbnail and full size image show up. To do this you can use the following snippets accordingly:

< ?php userphoto($wp_query->get_queried_object()) ?>

In basic terminology what this says is: “If the User Photo plugin is activated show the corresponding thumbnail for the posts’ author here.”. This approach can be used with any of the plugins functions:

  • userphoto_the_author_photo()
  • userphoto_the_author_thumbnail()
  • userphoto_comment_author_photo()
  • userphoto_comment_author_thumbnail()

Author

How we work Process

Product Hero Talin Wadsworth