2012-07-20 37 views
0

我有網站http://insideoutdogtraining.com/young-calicoe-dog-fighting其中作者框是使用插件http://dempseymarketing.com/products/relauthor-plugin-for-wordpress/下發布內容。更改用戶圖片大小n wordpress get_avatar(get_the_author_meta('user_email'),75)

但我想增加作者圖片的大小,以便它適合主作者盒子div。但是我改變了get_avatar中沒有用的任何其他值,它僅僅是50x50。 我如何增加圖像的大小?

回答

0

爲什麼不在你的主題中使用這行代碼而不是插件?

<?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">&rarr;</span>', 'yourthemesname'), get_the_author()); ?> 
       </a> 
      </div><!-- #author-link --> 
     </div><!-- #author-description --> 
    </div><!-- #author-info --> 
<?php endif; ?> 
1

如果你的主題都支持自定義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;} 

你會得到結果是這樣的:http://prntscr.com/6aenaz