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

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

          WordPress无ag真人线上注册插问鼎下载链接入口苹果怎么下载件外部链接自动添加nofollow标签

          2025-06-19 23:39:51 4687
          如果手动每个链接加入是很麻烦,可以直接找一些wordpress插件安装。有些外部链接是没有加Nofollow标签,这样所有的外部链接就会自动加上nofollow标签。当然我们也可ag真人线上注册<问鼎下载链接入口苹果怎么下载/strong>以通过代码实现无插件添加方法。

          在wordpress写文章时,在技术层面是有传递出去权重。严格要求的话是需要在外部链接全部加上nofollow标签。***<问鼎下载链接入口苹果怎么下载strong>ag真人线上注册***有时内容会引用或分享一些外部链接地址,当然目前一些wordpress主题设置有这个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://yugbc.xny028cc.com/put/7-2621.html
          版权声明

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

          热门标签

          全站热门

          WordPress响应式/音乐/个人博客杂志Always主题V1.8

          注册的域名怎么出售卖出去,域名交易渠道有哪些

          个人网站香港主机野草云选购

          大疆新款扫地机器人即将揭秘:别再忍耐,让尘埃落定!

          WordPress图片主题Lovephoto2.0.2分享

          AI加持电竞模式!iQOO新款智能手表799元起,运动健康好帮手

          2024黄色闪电404错误页面代码

          个人网站/公司logo标志免费在线制作

          友情链接