Support » Fixing WordPress » Profile photo?

  • I would like to add profile photos for each of the users on my blog. I installed the User Photo plug-in and was able to add a photo to my profile, but the photo does not show up with my posts. Do I need to add code somewhere to make this happen? If so, can you please be specific about what I need to add and where I need to add it? Thanks.

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

    the plugin gives you instructions on how to do this.

    you need to edit your theme to accomodate the new functionality.
    you have new template tags to use…one of these would do what y9ou want:


    so something like this added to your theme….maybe just under the by <?php the_author() ?> line:

    <?php userphoto_the_author_thumbnail() ?>
    would add a thumbnail version of the profile photo.

    (of course I can’t tell you specifically how to do it without seeing your site…but this is generally how to do it…everything is explained on the plugin page)

    Thanks for the info. I’m new to this — which page do I add that line (or lines) to? (By the way, I did read the plugin page and followed the directions there, but it didn’t work for me.)

    well….where you use the code depends on exactly where you want the pic.

    index.php is probably a good place to start. Again, I’d need to look at your site to give you better context.

    index.php controls the layout on blog type post pages, page.php for single pages, single.php for single posts…usually

    <div class="titleText"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></div>
    <div class="date"><span>Posted by <?php the_author(); ?> under <?php the_category(', '); ?> on <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?></span></div>

    Is what my index.php looks like…..this is the code above the call to the post content, which looks like: <?php the_content('Read the rest of this entry &raquo;'); ?>

    the stuff referencing the_title displays the title, the next batch of code displays the author, date, time, etc.

    I would either put the `<?php userphoto_the_author_thumbnail() ?>
    ` above the line of code that calls the title, or after the line of code that calls the author/date/etc

    You can experiment pasting it in different areas….. Also, once its showing you may have to style it a bit. Possibly wrapping it in a div class and applying a little css

    This still does not work for me. I don’t understand a lot about the coding, so I’m sure it would be easier if I did.

    However, I’d still like to make this work. Is there a plugin with this functionality that would be more geared to a newbie like me?


    I don’t know much about php…so I don’t know how important this is, or if it matters…. but the example code I cut and pasted from the plugin is missing the semi-colon I see in all other php lines

    <?php userphoto_the_author_thumbnail() ?>

    maybe should be

    <?php userphoto_the_author_thumbnail(); ?>

    dunno if that changes anything?

    One more thought. I’ve pasted my author.php below. Could it be placed somewhere on that page?
    /* Arclite/digitalnature */

    <!– main wrappers –>
    <div id=”main-wrap1″>
    <div id=”main-wrap2″>

    <!– main page block –>
    <div id=”main” class=”block-content”>
    <div class=”mask-main rightdiv”>
    <div class=”mask-left”>

    <!– first column –>
    <div class=”col1″>
    <div id=”main-content”>

    // global $wp_query;
    // $curauth = $wp_query->get_queried_object();

    if(isset($_GET[‘author_name’])) : $curauth = get_userdatabylogin($author_name); else : $curauth = get_userdata(intval($author)); endif;

    <h1><?php echo $curauth->display_name; ?></h1>

    <div class=”profile”>
    <div class=”avatar left”><?php echo get_avatar($curauth->user_email, ‘128’, $avatar); ?></div>
    <div class=”info”>
    <?phpif($curauth->user_description<>”): echo $curauth->user_description;
    else: _e(“This user hasn’t shared any biographical information”,”arclite”);
    if(($curauth->user_url<>’http://’) && ($curauth->user_url<>”)) echo ‘<p class=”im”>’.__(‘Homepage:’,’arclite’).’ user_url.'”>’.$curauth->user_url.’</p>’;
    if($curauth->yim<>”) echo ‘<p class=”im”>’.__(‘Yahoo Messenger:’,’arclite’).’ yim.'”>’.$curauth->yim.’</p>’;
    if($curauth->jabber<>”) echo ‘<p class=”im”>’.__(‘Jabber/GTalk:’,’arclite’).’ jabber.'”>’.$curauth->jabber.’</p>’;
    if($curauth->aim<>”) echo ‘<p class=”im”>’.__(‘AIM:’,’arclite’).’ aim.'”>’.$curauth->aim.’</p>’;
    <div class=”clear”></div>
    <div class=”clear”></div>

    <?php if (have_posts()): ?>
    <h1><?php printf(__(‘Posts by %s’, ‘arclite’), $curauth->display_name); ?></h1>
    <?php while (have_posts()) : the_post(); ?>
    <div id=”post-<?php the_ID(); ?>” <?php if (function_exists(“post_class”)) post_class(); else print ‘class=”post”‘; ?>>
    <h3 id=”post-<?php the_ID(); ?>” class=”post-title”>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h3>
    <!– displays the user’s photo and then thumbnail –>

    <small><?php the_time(__(‘l, F jS, Y’,’arclite’)) ?></small>
    <p><?php the_tags(__(‘Tags:’,’arclite’).’ ‘, ‘, ‘, ‘
    ‘); ?> <?php printf(__(‘Posted in %s’,’arclite’), get_the_category_list(‘, ‘));?> | <?php edit_post_link(__(‘Edit’,’arclite’), ”, ‘ | ‘); ?> <?php comments_popup_link(__(‘No Comments’,’arclite’), __(‘1 Comment’,’arclite’), __(‘% Comments’,’arclite’)); ?></p>
    <?php endwhile; ?>

    <div class=”navigation” id=”pagenavi”>
    <?php if(function_exists(‘wp_pagenavi’)) : ?>
    <?php wp_pagenavi() ?>
    <?php else : ?>
    <div class=”alignleft”><?php next_posts_link(__(‘« Older Entries’,’arclite’)) ?></div>
    <div class=”alignright”><?php previous_posts_link(__(‘Newer Entries »’,’arclite’)) ?></div>
    <div class=”clear”></div>
    <?php endif; ?>

    <?php else : ?>
    <p class=”error”><?php _e(‘No posts found by this author.’,’arclite’); ?></p>
    <?php endif; ?>

    <!– /first column –>
    <?php get_sidebar(); ?>
    <?php include(TEMPLATEPATH . ‘/sidebar-secondary.php’); ?>

    <div class=”clear-content”></div>
    <!– /main page block –>

    <!– /main wrappers –>

    <?php get_footer(); ?>

    I got a question for you gang. Does anyone EVER give someone a straight answer around here? I have been trying to get anyone to tell me how to post a profile photo so it becomes my avatar and appears on my profile, emails, posts, blogs, etc. and all I get is no such problem, download a plugin for it and like garbage talk. I did finally find User Photo but when I DLd it and opened it all I have is a bunch of texting crap! No homepage, no instructions, no wizard loading pages- nothing! I have no trouble putting images and even videos into my posts so why is getting a simple avatar pix on my profile so bloody difficult? Hell I can’t even get drafts to save for me or to even get a damned post to publish for me! WordPress was never so screwed up as they got it now! Why can’t anyone help me dammit? And as to asking WP for help- how? I cannot find a single ‘Contact Us’ blurb or email address for them anywhere! Who the Hell do they think they are- Firefox and Mozilla! Try getting a straight answer from that bunch of losers! Good luck! Aw nobody gives a damn about me and my problems anyway! So what if it won’t work, who cares, right? Everybody hates me and the world’s against me as usual! Sayonara- K&K in Brookhaven PA-USA (Screwed as usual by everyone)

    I have to agree with the user above!keimanzerokeimanzero…I can’t find a single straightforward thing as to uploading a profile photo!!! I’m beginning to think no one wants to see what I look like!

    I bet keimanzero is no longer a member…and who could blame them?


    Well, when you are asking for things that don’t actually exist in WordPress, what do you expect really?

    WordPress can’t have every single feature that every user wants. The software would be giant, bloated and slow.

    Instead you are given the option to do things for yourself. That’s what WordPress is about, if it’s too much for you…there are other options for you…like, etc.

    Not trying to sound condescending here, you just have to decide.

    WordPress has no ‘profile photo’. You can add one. But what exactly do you want it to do? Where should it go? How do you want to implement it? You see, many different people call many different things a ‘profile photo’ and they expect it to do different things.

    Do you just want an avatar? WP uses gravatar. upload your avatar there. That will allow WP to ‘use it’ but that won’t automatically put it anywhere. You need to use a theme that supports it, or code it into your theme yourself.

    Do you want your ‘profile photo’ on one page? Next to comments? Next to all posts?

    You see what I mean? There are so many variables. Its hard to answer a really generic question.

    Or did you mean a profile photo on here? The wordpress forums? That also uses gravatar. Sign up there and voila, you will have a picture on here

    To add a thumbnail using the User Photo Plugin . . .

    Just for future reference, the following code works when you add it in the page, post or comment . . .

    <?php userphoto_the_author_thumbnail() ?>

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Profile photo?’ is closed to new replies.