|
#1

Apr 18, 2011, 10:46 AM
|
 |
|
|
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

Apr 18, 2011, 12:22 PM
|
 |
|
|
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

Apr 18, 2011, 12:27 PM
|
 |
|
|
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

Apr 18, 2011, 12:29 PM
|
 |
|
|
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

Apr 18, 2011, 12:32 PM
|
 |
|
|
69 posts · Feb 2009
Minneapolis, MN USA
|
|
Here you go...
|
#6

Apr 18, 2011, 01:29 PM
|
 |
|
|
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

Apr 18, 2011, 01:46 PM
|
 |
|
|
69 posts · Feb 2009
Minneapolis, MN USA
|
|
It's in the center column, "tje Loop" near the top.
I attached a screen cap
|
#8

Apr 18, 2011, 02:01 PM
|
 |
|
|
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

Apr 18, 2011, 02:07 PM
|
 |
|
|
69 posts · Feb 2009
Minneapolis, MN USA
|
|
ok - thanks for your time btw!
|
#10

Apr 18, 2011, 02:23 PM
|
 |
|
|
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

Apr 18, 2011, 02:34 PM
|
 |
|
|
69 posts · Feb 2009
Minneapolis, MN USA
|
|
Yeah!!!! You made my day! Thanks JD! Time for another donation!
|
|