![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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.
|
|
#3
|
|||
|
|||
|
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'); ?> · <?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
|
||||
|
||||
|
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
|
|||
|
|||
|
Sorry, still not working...
|
|
#6
|
||||
|
||||
|
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
|
|||
|
|||
|
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'); ?> · <?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 | |
|
|
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 |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us