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 »

[SOLVED] Post Avatar


  #1  
Old Apr 18, 2011, 10:46 AM
Webmason's Avatar
Webmason
 
69 posts · Feb 2009
Minneapolis, MN USA
Hello,

I have added the following code inside the center column loop and it has the desired effect.
Code:
<?php echo get_avatar( get_the_author_email(), '32' ); ?>
But I just want this avatar to show up on posts, not pages. Right now it comes up on both. Can this be done?

Thanks!
Tom
  #2  
Old Apr 18, 2011, 12:22 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you should try adding a test to see if you are on a 'page' page
HTML Code:
<?php if (!is_page() {echo get_avatar( get_the_author_email(), '32' );} ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Apr 18, 2011, 12:27 PM
Webmason's Avatar
Webmason
 
69 posts · Feb 2009
Minneapolis, MN USA
I thought it would be something like that, but for some reason when I add that, the pages (inside the loop) just don't show anything.

Any thoughts?
  #4  
Old Apr 18, 2011, 12:29 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
where are you putting in in the looP?
Export your Ataualpa settings and attach to a reply
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Apr 18, 2011, 12:32 PM
Webmason's Avatar
Webmason
 
69 posts · Feb 2009
Minneapolis, MN USA
Here you go...
Attached Files
File Type: txt ata-iam4windcom-20110418.txt (18.9 KB, 1233 views)
  #6  
Old Apr 18, 2011, 01:29 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
I don't see that code in the loop? where is it?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Apr 18, 2011, 01:46 PM
Webmason's Avatar
Webmason
 
69 posts · Feb 2009
Minneapolis, MN USA
It's in the center column, "tje Loop" near the top.

I attached a screen cap
Attached Thumbnails
Click image for larger version

Name:	code.jpg
Views:	1032
Size:	85.2 KB
ID:	1298  
  #8  
Old Apr 18, 2011, 02:01 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
are you sure you didn't type a parentheses ')' instead of squiggly bracket '}'?

send me the export with the if statement in it.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Apr 18, 2011, 02:07 PM
Webmason's Avatar
Webmason
 
69 posts · Feb 2009
Minneapolis, MN USA
ok - thanks for your time btw!
Attached Files
File Type: txt ata-iam4windcom-20110418.txt (18.9 KB, 1110 views)
  #10  
Old Apr 18, 2011, 02:23 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
my mistake, i left out the closing ')' in the conditional, so instead of
HTML Code:
<?php if (!is_page() {echo get_avatar( get_the_author_email(), '32' );} ?>
it should be
HTML Code:
<?php if (!is_page()) {echo get_avatar( get_the_author_email(), '32' );} ?>
With the closing parentheses missing, everything after that became part of the IF condition. No wonder it didn't work.

Funny thing, I was just talking to Lmilesw this morning and said keeping track of your open/close parentheses is a place you always trip over.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #11  
Old Apr 18, 2011, 02:34 PM
Webmason's Avatar
Webmason
 
69 posts · Feb 2009
Minneapolis, MN USA
Yeah!!!! You made my day! Thanks JD! Time for another donation!

Bookmarks

Tags
avatar, code, page, post

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help please with Styling Avatar Stevieboy Center area post/pages 9 Nov 22, 2010 03:29 PM
How to show User Avatar as part of post Byline?? fredless Plugins & Atahualpa 4 Nov 7, 2010 11:26 AM
How to remove border around avatar? A333 Sidebars & Widgets 4 Dec 3, 2009 09:06 AM
How to change the default Avatar whatsmytruth Comments, trackbacks & pings 5 May 14, 2009 07:39 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 05:47 PM.


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