<code id='A76F40303E'></code><style id='A76F40303E'></style>
    • <acronym id='A76F40303E'></acronym>
      <center id='A76F40303E'><center id='A76F40303E'><tfoot id='A76F40303E'></tfoot></center><abbr id='A76F40303E'><dir id='A76F40303E'><tfoot id='A76F40303E'></tfoot><noframes id='A76F40303E'>

    • <optgroup id='A76F40303E'><strike id='A76F40303E'><sup id='A76F40303E'></sup></strike><code id='A76F40303E'></code></optgroup>
        1. <b id='A76F40303E'><label id='A76F40303E'><select id='A76F40303E'><dt id='A76F40303E'><span id='A76F40303E'></span></dt></select></label></b><u id='A76F40303E'></u>
          <i id='A76F40303E'><strike id='A76F40303E'><tt id='A76F40303E'><pre id='A76F40303E'></pre></tt></strike></i>

          WordPress无北京k10赛车下载app插件外部链接自动添加nofollow标签九游游戏app官网

          2025-06-21 08:59:52 4552
          如果手动每个链接加入是很麻烦,

          在技术层面是有传递出去权重。当然我们也可以通过代码实现无插件添加方法。

          北京k10赛车下载app在wordpress写文章时,九游游戏app官网可以直接找一些wordpress插件安装。有时内容会引用或分享一些外部链接地址,这样所有的外部链接就会自动加上nofollow标签。有些外部链北京k1九游游戏app官网0赛车下载app接是没有加Nofollow标签,当然目前一些wordpress主题设置有这个nofollow标签功能。严格要求的话是需要在外部链接全部加上nofollow标签。

          //文章自动nofollowadd_filter( 'the_content', 'tin_seo_wl');function tin_seo_wl( $content ) {    $regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>";    if(preg_match_all("/$regexp/siU", $content, $matches, PREG_SET_ORDER)) {        if( !empty($matches) ) {               $srcUrl = get_option('siteurl');            for ($i=0; $i < count($matches); $i++)            {                   $tag = $matches[$i][0];                $tag2 = $matches[$i][0];                $url = $matches[$i][0];                   $noFollow = '';                $pattern = '/target\s*=\s*"\s*_blank\s*"/';                preg_match($pattern, $tag2, $match, PREG_OFFSET_CAPTURE);                if( count($match) < 1 )                    $noFollow .= ' target="_blank" ';                   $pattern = '/rel\s*=\s*"\s*[n|d]ofollow\s*"/';                preg_match($pattern, $tag2, $match, PREG_OFFSET_CAPTURE);                if( count($match) < 1 ) $noFollow .= ' rel="nofollow" '; $pos = strpos($url,$srcUrl); if ($pos === false) { $tag = rtrim ($tag,'>');                    $tag .= $noFollow.'>';                    $content = str_replace($tag2,$tag,$content);                }            }        }    }       $content = str_replace(']]>', ']]>', $content);    return $content;}

          添加到当前主题Funcions.php 文件中,

          本文地址:http://mcdji.xny028cc.com/agent/2-7352991.html
          版权声明

          本文仅代表作者观点,不代表本站立场。
          本文系作者授权发表,未经许可,不得转载。

          热门标签

          全站热门

          Helen响应式wordpress博客主题,个人博客网站模板/html模板

          帝国cms网站链接URL伪静态设置方法

          小米推出15周年纪念版智能手表:eSIM独立联网,自研玄戒T1芯片,仅售1299元,惊喜体验等你来!

          帝国CMS内容链接百度主动推送插件BDPush ProV1.1

          WordPress二次元博客lolimeow主题v8.0下载

          35dir网站分类目录导航源码(经典彩色版)

          小米米家扫拖机器人 M40 S 上市:升降导航、大吸力清洁新体验,2999元起,智能家居新选择!

          python程序实现域名备案信息查询

          友情链接