最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

theme development - Array for Wordpress Avatar Size and Class

programmeradmin2浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

Try this

<?php if ($args['avatar_size'] != 0) echo get_avatar($comment,'70',$default, $alt,array('class'=>array('media-object','thumbnail'))); ?>
发布评论

评论列表(0)

  1. 暂无评论