Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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


  #1  
Old Oct 7, 2011, 11:51 AM
Stevieboy
 
11 posts · Oct 2010
England
Smile Howto: add an Avatar to all Posts

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 12:30 AM.


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