StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
  #1  
Old 03-06-2009, 08:26 AM
jchen127127 jchen127127 is offline
Registered User
Pro Plus Member
 
Join Date: Jan 2009
Posts: 5
Default How to display gravatar to the left of the post title?

I'm running a multi-user site so I'd like each author's gravatar to appear next to the post title, same as Mashable.com does. Currently the gravatar shows up in the actual post.

According to this link: http://themeshaper.com/how-to-add-grava ... wordpress/, this line should be inserted somewhere in the code, <?php echo get_avatar( get_the_author_email(), '80' ); ?>.

Thanks in advance!
  #2  
Old 03-06-2009, 08:42 AM
Rebecca Diamond's Avatar
Rebecca Diamond Rebecca Diamond is offline
Administrator
 
Join Date: Oct 2008
Location: somewhere in the wilds of Canada
Posts: 11,498
Default Re: How to display gravatar to the left of the post title?

you post it in the single.php or index.php in the div "postauthor", and you'd want to post it after the "h1" tag. It may take some playing in CSS to get it to display properly.
__________________
Rebecca, Copyblogger Community Manager & Admin
StudioPress on Facebook!
  #3  
Old 03-07-2009, 07:51 AM
jchen127127 jchen127127 is offline
Registered User
Pro Plus Member
 
Join Date: Jan 2009
Posts: 5
Default Re: How to display gravatar to the left of the post title?

The code you are referring to looks like this in my index.php (there's no single.php, or the )

<div class="postauthor">

I put the code here ---> <?php echo get_avatar( get_the_author_email(), '80' ); ?>



Posted by <?php the_author_posts_link(); ?> on <?php the_time('l, F j, Y'); ?> &middot; <?php comments_number('Leave a Comment', '1 Comment', '% Comments'); ?><?php edit_post_link('(Edit)', '', ''); ?></p>

then tried it here ----> <?php echo get_avatar( get_the_author_email(), '80' ); ?>
</div>

I even tried putting it above the postauthor div, but nothing happened. Am I missing something?

Thanks in advance
  #4  
Old 03-07-2009, 09:20 AM
Debra's Avatar
Debra Debra is offline
Community Moderator
 
Join Date: Oct 2009
Location: Ontario, Canada
Posts: 13,365
Default Re: How to display gravatar to the left of the post title?

try this

Code:
<h1><?php echo get_avatar( get_the_author_email(), '80' ); ?> <?php the_title(); ?></h1>
__________________
Fat Cat Designs | "Creativity takes courage." Henri Matisse

Make life easier use FireFox and these Customizing tools: Firebug - Web Developer

New to Genesis? See our Guide for Beginners!

Recommended StudioPress Designer
StudioPress on Facebook
  #5  
Old 03-10-2009, 10:06 PM
jchen127127 jchen127127 is offline
Registered User
Pro Plus Member
 
Join Date: Jan 2009
Posts: 5
Default Re: How to display gravatar to the left of the post title?

Sorry, still not working...
  #6  
Old 03-10-2009, 10:09 PM
Debra's Avatar
Debra Debra is offline
Community Moderator
 
Join Date: Oct 2009
Location: Ontario, Canada
Posts: 13,365
Default Re: How to display gravatar to the left of the post title?

Works for me on a test site so I don't know what to tell you.

Do you have a gravatar?

Do you have gravatars enabled under settings =discussion
__________________
Fat Cat Designs | "Creativity takes courage." Henri Matisse

Make life easier use FireFox and these Customizing tools: Firebug - Web Developer

New to Genesis? See our Guide for Beginners!

Recommended StudioPress Designer
StudioPress on Facebook
  #7  
Old 03-10-2009, 11:43 PM
jchen127127 jchen127127 is offline
Registered User
Pro Plus Member
 
Join Date: Jan 2009
Posts: 5
Default Re: How to display gravatar to the left of the post title?

Do you have a gravatar?
yes, they work fine, they appear in the comments. The point was I wanted them aligned next to the title, rather than in the body of the post.

See here: http://www.odysseylc.com/2009/02/26/dif ... /#comments

Do you have gravatars enabled under settings =discussion
yes.

Just to double-check, the codes now appear as
" <div class="postauthor">

<h1><?php echo get_avatar( get_the_author_email(), '80' ); ?> <?php the_title(); ?></h1>



Posted by <?php the_author_posts_link(); ?> on <?php the_time('l, F j, Y'); ?> &middot; <?php comments_number('Leave a Comment', '1 Comment', '% Comments'); ?><?php edit_post_link('(Edit)', '', ''); ?></p
</div>"
in the index.php file under /wp-content/theme/corporate/

Thanks!
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display Image Next To Post Title On Sidebar fee_m General Discussion 1 06-08-2010 01:18 AM
Display Post Title Above Thumbnail? Cat3KidsandUs General Discussion 1 03-27-2009 08:31 AM


All times are GMT -5. The time now is 04:29 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.