I’m trying to make gravatars link to the commentor’s website.
I tried to wrap a link around <?php echo get_avatar($comment,$size=’64’); ?> but nothing is happening. Can you put a php echo inside a link? my understanding is that the output is an img?
here’s my code at the moment, everything is displaying fine but not linking to the comment author’s site.
Also, as an aside, i’d also like to include an if statement to check if the commentor entered a website and only link if they did. i’m new to php etc but know java pretty well.
really really appreciate the help! π
alex
The topic ‘Link Avatar Image in Comments’ is closed to new replies.
(@unleashreality)
13 years, 4 months ago
Hello everyone! π
I’m trying to make gravatars link to the commentor’s website.
I tried to wrap a link around <?php echo get_avatar($comment,$size=’64’); ?> but nothing is happening. Can you put a php echo inside a link? my understanding is that the output is an img?
here’s my code at the moment, everything is displaying fine but not linking to the comment author’s site.
Also, as an aside, i’d also like to include an if statement to check if the commentor entered a website and only link if they did. i’m new to php etc but know java pretty well.
really really appreciate the help! π
alex