wordpress评论者链接在新窗口中打开的方法介绍
WordPress点击评论者链接是在本窗口内打开,用户体验不是特别好,介绍一下wordpress评论者链接在新窗口中打开的方法,解决方法如下
找到wp-includes/comment-template.php文件中
if ( empty( $url ) || ‘http://’ == $url ) $return = $author; else $return = “<a href=’$url’ rel=’external nofollow’ class=’url’>$author</a>”; return apply_filters(‘get_comment_author_link’, $return); } |
给$return值上加个target=’_blank’
if ( empty( $url ) || ‘http://’ == $url ) $return = $author; else $return = “<a href=’$url’ rel=’external nofollow’ class=’url’ target=’_blank’>$author</a>”; return apply_filters(‘get_comment_author_link’, $return); } |
如您对本文有所疑义或者有任何需求,欢迎咨询本网站!希望大家多多支持!
发表评论