
wordpress如何让所有外链在新窗口打开并添加nofollow属性,下面web建站小编给大家详细介绍一下具体代码!
打开主题下functions.php文件,新增以下代码:
function cleris_url($atts, $url = null){
extract( shortcode_atts(array('title' => null, 'href' => null), $atts) );
return '<a target="_blank" title="'.$title.'" href="'.$href.'"
rel="external nofollow" target="_blank">'.$url.'</a>';
}
wordpress建站如何快速提交和优化您的网站(IndexNow插件)?
标签: nofollow属性, wordpress技巧
上面是“wordpress如何让所有外链添加nofollow属性”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_3688.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

Vue入门需要掌握哪些知识
抖音灵机:一款抖音直播官方出品的直播数据平台
火箭加速器永久免费版