Add avatar support
-
on your comments.php file
remove the following
17th line the ending comma “,”
18th line remove “‘get_avatar’ =>” its not a designated argumentHope this helps. If its still not working, let me know, I’ll try to help.
I didn’t remove my edits, sorry my fault.
This is original version
Before I was trying to insert get_avatar function in array.provide me the url of your site, I have to see whats happening. I dont see anything wrong with the comments.php file
2 comments only Site was previously run on another CMS and adapted to WP, old comments lost.
Can you please recheck if you have avatars enabled in discussion settings? It I dont see any avatars for both of the comments.
“Show avatars” checked.
on your comments.php file replace
$args = array( 'style' => 'div', 'callback' => 'comment_tmp', 'reverse_top_level' => true, );with
$args = array( 'style' => 'div', 'callback' => 'comment_tmp', 'reverse_top_level' => true, 'avatar_size' => 72, );Replaced, still nothing, full code
just for testing remove replace those with the following
$args = array( 'style' => 'div', 'avatar_size' => 72, );I think that callback function has something to do with this issue.
Yeap, now it’s working. You awesome man!
I am delighted to be able to come to the aid. 🙂
cheers
The topic ‘Add avatar support’ is closed to new replies.
(@cosmopull)
10 years, 5 months ago
I have custom theme which has no avatars support, so i want to add them.
Tried to insert
<?php echo get_avatar ($comment, $size='64'); ?>in theme’s comments.php file and avatar shown only once in very up or down only instead close to each comment.
How to enable it properly ?
Full code of comments.php