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

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

          WordPress无云开体育免费下载插巅峰国际-科技赋能场景,让娱乐更有趣件外部链接自动添加nofollow标签

          2025-06-21 08:46:51 71
          当然我们也可以通过代码实现无插件添加方法。在技术层面是有传递出去权重。

          在wordpress写文章时,有时内容会引用或分享一些外部链接地址,可以直接找一<巅峰国际-科技赋能场景,让娱乐更有趣strong>云开体育免费下载些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 文件中,当然目前一些wordpress主题设置有这个nofollow标签功能。这样所有的外部链接就会自动加上nofollow标签。

          本文地址:http://8wcro.xny028cc.com/indeed/4-3.html
          版权声明

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

          热门标签

          全站热门

          dedecms织梦5.7仿站视频教程(初级上部)

          BTC Maintains $70K Despite Heightened GBTC Outflows, WIF Plummets Again (Market Watch)

          网页出现Uncaught SyntaxError: Unexpected token错误

          飞牛fnOS系统虚拟机迎来v0.9.0更新,新增安装镜像支持,从此告别繁琐安装

          JavaScript对象和数组(Object类型与Array类型)

          Favicon网站图标抓取API接口php源码

          23亿!武汉青山区(化工区)北湖绿城EOD项目实施主体征求意见

          jQuery鼠标点击弹出分享按钮代码

          友情链接