Here is a nifty trick for your comments.php
template. If someone comes to your site and leaves a comment but doesn’t leave a url back to there site, the default link that is shown in place of the php code comment_author_url
is the current page link.
That might not look good. So, here is a little trick that I just implemented into my site. Besides installing the twittar plugin and pulling Twitter avatars I wanted to use the image itself for the authors url like. But if the author doesn’t have a Twitter avatar or a Gravatar it will display a default Gravatar that I set. If the default Gravatar is shown, usually the author will not leave a url link.
I would like to link the image to Gravatar.com so that they can get an image attached to their email address. So.. here is the code:
<?php if($comment->comment_author_url != "") { ?> <a href="<?php comment_author_url(); ?>"><?php gravatar(); ?></a> <?php } else { ?> <a href="http://gravatar.com" title="Get a Gravatar today!"><?php gravatar(); ?></a> <?php } ?>
The WordPress development blog has put a date on the release of 2.8, plus some…
I know many people attendedWordCamp 2009, in fact I believe there were 700 plus attendees.…
Over view notes of San Francisco WordCamp 2009 by [insert creator]??
I might like to start off by saying Happy Birthday WordPress. I don't have any…
Planning Who let you in? Format Daily Weekly Monthly Hour/half hour A show's Outline -…
View Comments
very nice idea, it could be an advertising slot.