Title: (Plugin: User Photo) Author.php
Last modified: August 19, 2016

---

# (Plugin: User Photo) Author.php

 *  Resolved [dillouz](https://wordpress.org/support/users/dillouz/)
 * (@dillouz)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/)
 * How can I add the user photo to author.php? This is important.
 * [http://wordpress.org/extend/plugins/user-photo/](http://wordpress.org/extend/plugins/user-photo/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [@mercime](https://wordpress.org/support/users/mercime/)
 * (@mercime)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/#post-845280)
 * Forum search is your friend
    [http://wordpress.org/support/topic/197095?replies=4](http://wordpress.org/support/topic/197095?replies=4)
 *  Thread Starter [dillouz](https://wordpress.org/support/users/dillouz/)
 * (@dillouz)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/#post-845281)
 * Thanks for your help.
 * However,
 * This works for posts, not for showing a photo on author.php
 * at least it doesn’t work for me
 *  [@mercime](https://wordpress.org/support/users/mercime/)
 * (@mercime)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/#post-845290)
 * author.php
 * <?php
    $authordata = get_userdata(); userphoto_the_author_photo(); ?>
 *  Thread Starter [dillouz](https://wordpress.org/support/users/dillouz/)
 * (@dillouz)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/#post-845318)
 * Thank you, I think we’re getting somewhere
 * Now I get this instead of the image :
 * Warning: Missing argument 1 for get_userdata(), called in /home/.tooter/wp-content/
   themes/polaroidtheme/author.php on line 17 and defined in tzipiyah.com/wp-includes/
   pluggable.php on line 121
 *  [@mercime](https://wordpress.org/support/users/mercime/)
 * (@mercime)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/#post-845325)
 * Whew, have to review the stuff, ok let’s try another way. Just before the loop,
   add this
 *     ```
       <?php
       if(isset($_GET['author_name'])) :
       $curauth = get_userdatabylogin($author_name);
       else :
       $curauth = get_userdata(intval($author));
       endif;
       ?>
       ```
   
 * then your name
    then inside the loop `<?php echo userphoto_the_author_photo();?
   >`
 *  Thread Starter [dillouz](https://wordpress.org/support/users/dillouz/)
 * (@dillouz)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/#post-845417)
 * Thanks but…
    Again :-/, I hope I’m not becoming annoying.
 * I want to display the picture outside of the loop, in a profile I create for 
   each user on author.php . When I use your code in author.php (not the posts but
   the profile section), nothing shows up…
 *  [lambic](https://wordpress.org/support/users/lambic/)
 * (@lambic)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/#post-845473)
 * I use this plugin:
 * [http://geekgrl.net/2007/01/02/profile-pics-plugin-release/](http://geekgrl.net/2007/01/02/profile-pics-plugin-release/)
 * And have this in my author.php:
 * <?php
    global $wp_query, $userdata; $memberdata = $wp_query->get_queried_object();
   get_currentuserinfo();
 * if (!strstr(author_image_path($memberdata->ID,false), “default”))
    author_image_tag(
   $memberdata->ID); ?>
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/#post-845474)
 * [@dillouz](https://wordpress.org/support/users/dillouz/): Try this:
 *     ```
       global $authordata;
       $authordata=get_userdata(get_query_var( 'author' ));
       userphoto_the_author_photo();
       ```
   
 *  Thread Starter [dillouz](https://wordpress.org/support/users/dillouz/)
 * (@dillouz)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/#post-845479)
 * Otto42
    It works, thanks so much!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘(Plugin: User Photo) Author.php’ is closed to new replies.

 * 9 replies
 * 4 participants
 * Last reply from: [dillouz](https://wordpress.org/support/users/dillouz/)
 * Last activity: [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-authorphp/#post-845479)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
