【发布时间】:2012-02-14 11:57:32
【问题描述】:
我的 wordpress 网站使用子主题作为 21 主题。我遇到的问题是,在每条评论旁边,都会出现一个损坏的图像链接。但这只发生在 Chrome、Safari 和 Opera 中。在 Firefox 和 IE 中不存在。
奇怪的是,当我右键单击损坏的图像链接以尝试在源代码中检查它时,那里什么都没有。它不在 DOM 中!!!
我尝试进入 Wordpress 的讨论设置并将头像显示更改为不显示,并将默认头像更改为空白。我已经从 211 的 functions.php 中删除了所有显示头像的代码(在函数 211-comment 中)。我已经尝试了我能想到的所有可能的 CSS 解决方案,但我无法让它们消失。
你可以在这里看到我在说什么:http://www.andersonandsonsfh.com/2011/07/gordon-severson/
我真的不知道要包含什么代码,所以这是我的 211_comment 代码
if ( ! function_exists( 'twentyeleven_comment' ) ) :
function twentyeleven_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case 'pingback' :
case 'trackback' :
?>
<li class="post pingback">
<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?></p>
<?php
break;
default :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<article id="comment-<?php comment_ID(); ?>" class="comment">
<footer class="comment-meta">
<div class="comment-author vcard">
<?php
/* translators: 1: comment author, 2: date and time */
printf( __( '%1$s on %2$s <span class="says">said:</span>', 'twentyeleven' ),
sprintf( '<span class="fn">%s</span>', get_comment_author_link() ),
sprintf( '<a href="%1$s"><time pubdate datetime="%2$s">%3$s</time></a>',
esc_url( get_comment_link( $comment->comment_ID ) ),
get_comment_time( 'c' ),
/* translators: 1: date, 2: time */
sprintf( __( '%1$s at %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time() )
)
);
?>
<?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .comment-author .vcard -->
<?php if ( $comment->comment_approved == '0' ) : ?>
<em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>
<br />
<?php endif; ?>
</footer>
<div class="comment-content"><?php comment_text(); ?></div>
<div class="reply">
<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>↓</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
</div><!-- .reply -->
</article><!-- #comment-## -->
<?php
break;
endswitch;
}
endif; // ends check for twentyeleven_comment()
请帮忙!这快把我逼疯了!
【问题讨论】: