• hannahl

    (@hannahl)


    how do i add an image to the authors page? there is a place holder for the image but no image and I can’t find anywhere on the admin ‘users’ page to add an image.

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    (@esmi)

    This will be theme specific, so a link to your site might help. Or try placing a copy of your theme’s author.php file into the WordPress pastebin and post the pastebin url here. Perhaps someone will be able to spot the problem and suggest a solution.

    I installed the user photo plugin and activated it.
    I uploaded a photo for the author under their profile and in my author’s template I added this line of code:

    <img src="https://www.yourdomainname.com/wp/wp-content/uploads/userphoto/<?php echo $curauth->userphoto_image_file;?>" alt="<?php echo $curauth->first_name; ?> <?php echo $curauth->last_name; ?>" class="alignright" />

    That allowed me to display the author photo.

    Thread Starter hannahl

    (@hannahl)

    here is the link to my site so that you can see the example of the image that is missing…

    https://proconnection.servicemagic.com/author/seymour-t/

    Looks like you’re trying to pull an image from gravatar.com. Have you uploaded your photo on there?

    Thread Starter hannahl

    (@hannahl)

    thanks! I’ve sent an email to all of our authors asking them to upload an image. we’ll see what happens!

    I’ve used this plugin to add an author image:

    https://www.semiologic.com/software/author-image/

    This allows you to add the image in Dashboard and call to the image using <?php the_author_image();?> in your template. Along with WordPress’s “built-in” <?php the_author();?> and <?php the_author_description();?> you can build a nice author page or include the author bio at the bottom of a post.

    For bonus points, you can implement your own default gravatar.

    // THIS ADDS CUSTOM DEFAULT GRAVATAR
    if ( !function_exists('fb_addgravatar') ) {
        function fb_addgravatar( $avatar_defaults ) {
        $myavatar = get_bloginfo('template_directory').'/images/icon.png';
        //default avatar
        $avatar_defaults[$myavatar] = 'The Voodoo Empire';
        return $avatar_defaults;
        }
     add_filter( 'avatar_defaults', 'fb_addgravatar' );
    }

    in your themes functions.php ('/images/icon.png') will need to be edited to your image (which will need to be uploaded to the images folder in your theme)

    Then under settings->discussion your new icon will show up. You can select it, and then when people don’t have a gravatar set up, it will use the icon you uploaded

    Dunno if this interests you, but I just discovered how to do it…..and I think its cool, so figgered Id share

    Thread Starter hannahl

    (@hannahl)

    okay, so one of the authors just uploaded a gravatar image but it still doesn’t appear in his author page on the blog. should i be able to see something immediately? i am still baffled by the fact that one of the other author’s gravatar images appears on his author page, yet i didn’t do anything at all to make it appear. i am such a novice at this stuff!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘add image to authors page?’ is closed to new replies.