WordPress模板右侧下角显示头像图标的解决方法

2021年03月4日

这个方法可能只适合于twentyten这个模板,因为我另外一个亲子博客使用的就是这个模板,在刚才开启头像后却发现博客右侧下角显示出一排头像来,这样对整个博客页面的排版非常不好看,所以就想看看是哪里调用的这代码,把这个问题解决了。

找到博客根目录 wp-content/themes/twentyten/sidebar.php 这个文件,sidebar即是边栏的意思

if ( $counts ) {
  wp_cache_set( 'ludou_mostactive', $counts );

  foreach ($counts as $count) {
    $c_url = $count->comment_author_url;
    $mostactive .= '<li>' . '<a href="'. $c_url . '" title="' . $count->comment_author .' 发表 '. $count->cnt . ' 条评论" target="_blank">' . get_avatar($count->comment_author_email, 48, '', $count->comment_author . ' 发表 ' . $count->cnt . ' 条评论') . '</a></li>';
  }
  echo $mostactive;
}

将这段代码里的 echo $mostactive; 这行用 // 注释掉就可以了。


sicnature ---------------------------------------------------------------------
Your current IP address is: 3.91.8.23
Your IP address location: 美国弗吉尼亚阿什本
Your IP address country and region: 美国 美国
Your current browser is:
Your current system is:
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
Welcome to reprint. Please indicate the source https://www.myzhenai.com.cn/post/3740.html

没有评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注