24 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market

I’ve got everything working the way I’d like it, gravatar wise, except for one little thing that’s been bugging me.

I’m wonder if it is at all possible to include a file (let’s say Gravatars.png) and we wanted that to be our default image. if it possible to call that as the default without having the user upload the image and giving a direct URL ?

I’ve tried <?php gravatar( ‘default=/images/gravatar.png’ ) ; ?>

And it seems to do diddly. Normally, in a situation like this, I’d use <?php bloginfo(‘template_directory’ ) ; ?>/images/gravatar.png, but, unless I’m mistaken you can’t do the following

<?php gravatar( “http://www.”.bloginfo(‘template_directory’ ) .”/images/gravatar.png” ) ; ?>

Anyone know of a solution?,


Edit: Ahh! Smilies everywhere!.. Added Spaces in-between “problem areas” of code.

352 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+6 more

From the WordPress Codex:

<?php echo get_avatar( $comment, $size = ‘80’, $default = ‘<path_to_ur?>’ ); ?>

If that doesn’t work, try replacing $comment with $id_or_email.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes