手机
当前位置:查字典教程网 >CMS教程 >WordPress >wordpress评论者链接在新窗口中打开的方法
wordpress评论者链接在新窗口中打开的方法
摘要:找到wp-includes/comment-template.php文件中if(empty($url)||'http://'==$url)$...

找到wp-includes/comment-template.php文件中

if ( empty( $url ) || 'http://' == $url )

$return = $author;

else

$return = "<a href='$url' rel='external nofollow'>$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' target='_blank'>$author</a>";

return apply_filters('get_comment_author_link', $return);

}

【wordpress评论者链接在新窗口中打开的方法】相关文章:

wordpress无法登录后台的解决方案

WordPress中发送HTML邮件的方法

wordpress后台中的侧边栏添加菜单或子菜单的方法

WordPress中自动激活插件的实现方法

wordpress在IIS下伪静态后子目录无法访问的解决方法

Wordpress更换主题之后出错的解决方法

wordpress自定义摘要截取字数的代码

wordpress wp_list_categories(分类的链接列表)的使用方法

多个WordPress站点使用同一数据库的方法

WordPress文章ID不连续的解决方法

精品推荐
分类导航