What’s wrong with using:
<?php if ( function_exists( 'userphoto' ) ) :
userphoto($posts[0]->post_author);
else :?>
<img src="<?php bloginfo('template_directory'); ?>/images/blank_avatar_176x132.gif" width="132" height="176" />
<?php endif;?>
Thanks a millions esmi, i just didnt had the concepts of making conditional statements… but this isnt solving out the problem because the if there is not photo it shows nothing a simple white n i guess thats because we are using if plugin exist function …
what i need is that
if photo exist or else
else :?>
<img src="<?php bloginfo('template_directory'); ?>/images/blank_avatar_176x132.gif" width="132" height="176" />
<?php endif;?>
just like where you told above if function extist…
<?php if ( function_exists( ‘userphoto’ ) ) :
userphoto($posts[0]->post_author);
else :?>
<img src=”<?php bloginfo(‘template_directory’); ?>/images/blank_avatar_176x132.gif” width=”132″ height=”176″ />
<?php endif;?>
Try:
<?php if ( function_exists( 'userphoto' && userphoto($posts[0]->post_author != '') ) :
userphoto($posts[0]->post_author);
else :?>
<img src="<?php bloginfo('template_directory'); ?>/images/blank_avatar_176x132.gif" width="132" height="176" />
<?php endif;?>
Its breaking theme… π it says error on line 32 which is the line
Line 32
<?php if ( function_exists( 'userphoto' && userphoto($posts[0]->post_author != '') ) :
From your follow code the first line is breaking theme…
<?php if ( function_exists( 'userphoto' && userphoto($posts[0]->post_author != '') ) :
userphoto($posts[0]->post_author);
else :?>
<img src="<?php bloginfo('template_directory'); ?>/images/blank_avatar_176x132.gif" width="132" height="176" />
<?php endif;?>
I can see it! Try:
<?php if ( function_exists( 'userphoto') && userphoto($posts[0]->post_author != '') :
userphoto($posts[0]->post_author);
else :?>
<img src="<?php bloginfo('template_directory'); ?>/images/blank_avatar_176x132.gif" width="132" height="176" />
<?php endif;?>
Sorry esmi, π
Its again breaking themes the error comes at line 32 which is the first line of your code… pasted in dreamweaver to see where error occurs the first line’s <?php and the else :?> are highlighted in red…
<?php if ( function_exists( 'userphoto') && userphoto($posts[0]->post_author != '') :
userphoto($posts[0]->post_author);
else :?>
<img src="<?php bloginfo('template_directory'); ?>/images/blank_avatar_176x132.gif" width="132" height="176" />
<?php endif;?>
Sorry about this. I’ll get the bracket placement right eventually…
<?php if ( function_exists( 'userphoto') && userphoto($posts[0]->post_author) != '') :
userphoto($posts[0]->post_author);
else :?>
<img src="<?php bloginfo('template_directory'); ?>/images/blank_avatar_176x132.gif" width="132" height="176" />
<?php endif;?>
Also bear in mind that I have no idea what userphoto($posts[0]->post_author) normally returns.
AND YOU GOTTTTT ITTTTT!!!!!!!!! Esmi so much thankyou…. Thanks a tonsss….. God bless you simply… thats so cool… that u solved this big prob in munites!!! Thanks a tons… I would luv to return a favor via my blogs in future… thanks alot very much
Glad to hear that we got there in the end. Seems like you’ve been passing the favour on and trying to help others on the forums already. π
π Thanks i do look forward to help others and expand my knowledge and experience… just like you… π Thanks a tons…
You saved the Day…!!! π