更改用户图片大小n wordpress获取头像(获取作者元数据(';用户电子邮件';),75)
我有一个网站,作者框下的帖子内容使用插件 但我想增加作者图像的大小,使其适合主作者框div。但我更改了get_avatar中的任何其他值,该值没有任何用处,仅为50x50。更改用户图片大小n wordpress获取头像(获取作者元数据(';用户电子邮件';),75),wordpress,Wordpress,我有一个网站,作者框下的帖子内容使用插件 但我想增加作者图像的大小,使其适合主作者框div。但我更改了get_avatar中的任何其他值,该值没有任何用处,仅为50x50。 如何增加图像的大小?为什么不在主题中使用这行代码而不是插件 <?php if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) : //
如何增加图像的大小?为什么不在主题中使用这行代码而不是插件
<?php if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
<div id="author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'yourthemesname_author_bio_avatar_size', 68 ) ); ?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( __( 'About %s', 'yourthemesname' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'yourthemesname' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #author-info -->
<?php endif; ?>
如果您的主题支持自定义css,请尝试添加此css以使其看起来更漂亮:
.author-title {margin-top: 0;}
.data-image .avatar {border-radius: 6px; width: 80px; height: 80px;}
.author-box {width: 100%; padding: 0 30px 20px 0; clear: both;}
您将得到如下结果: