I tried to set size and class for wordpress avatar in comments but I couldnt.
<?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, array('class' => 'media-object') ); ?>
I want to set avatar in comments to 70x70 size and "media-object thumbnail" class then show it.
What is my mistake?
I re-wrote comment function in html5blank for better css but as a last thing, I couldnt do this.
php arrays wordpress
I tried to set size and class for wordpress avatar in comments but I couldnt.
<?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, array('class' => 'media-object') ); ?>
I want to set avatar in comments to 70x70 size and "media-object thumbnail" class then show it.
What is my mistake?
I re-wrote comment function in html5blank for better css but as a last thing, I couldnt do this.
php arrays wordpress
Share Improve this question asked Apr 29, 2020 at 1:14 I dont believe youI dont believe you 112 bronze badges1 Answer
Reset to default 0Try this
<?php if ($args['avatar_size'] != 0) echo get_avatar($comment,'70',$default, $alt,array('class'=>array('media-object','thumbnail'))); ?>