Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

Howto: add an Avatar to all Posts


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Oct 7, 2011, 11:51 AM
Stevieboy
 
11 posts · Oct 2010
England
With the newer versions of Atahualpa you can't have PHP code in the ATO --> Post Info Items.

So, this took me a few minutes to work out, in ATO --> Add HTML/CSS Inserts --> CSS Inserts

Add the following (and style as you see fit).

Code:
.avatar-64{
padding: 5px 5px 5px 5px !important;
border: solid 4px #eee !important;
margin: 10px 10px 0px 0px !important;
}
Then edit index.php, and add the following line indicated in Bold between the two existing lines.

Code:
if ( function_exists('post_class') ) { ?>
<?php if (!is_page()) {echo get_avatar( get_the_author_email(),'64' );} ?>
<div <?php if ( is_page() ) { post_class('post'); } else { post_class(); } ?> id="post-<?php the_ID(); ?>">
Of course make sure your Avatars are enabled.

Credits to JuggleDad for the php line that I found in one of his earlier earlier posts.

Hope it's useful so someone.
__________________
Steve
www.mayne.net

Last edited by Stevieboy; Oct 14, 2012 at 03:37 PM.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
BUGFIX 364-08: Using the 'Display Avatar' plugin causes two copies of the avatar juggledad Old Version fixes and change logs 0 Apr 26, 2011 06:35 AM
Help please with Styling Avatar Stevieboy Center area post/pages 9 Nov 22, 2010 03:29 PM
Avatar in Post using Avatar Plug-in DMO Atahualpa 3 Wordpress theme 1 Mar 23, 2009 09:43 PM


All times are GMT -6. The time now is 04:49 PM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.