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

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

          WordPress无问鼎pg官方入口插开元体育app官方版最新下载网站件外部链接自动添加nofollow标签

          2025-06-24 09:24:23 8

          有些外部链接是没有加Nofollow标签,这样所有的外部链接就会自动加上nofollow标签。当然我们也可以通过代码实现无插件添加方法。有时内容会问鼎pg官方入口<开元体育app官方版最新下载网站/strong>引用或分享一些外部链接地址,当然目前一些wordpress主题设置有这个nofollow标签功能。在技术层面是有传递出去权重。严格要求的话是需要在外部链接全部加上nofollow标签。如果手动每开元体育app官方版最新下载网站个链接问鼎pg官方入口加入是很麻烦,

          在wordpress写文章时,

          //文章自动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插件安装。

          本文地址:http://71qjs.xny028cc.com/suicide/7.html
          版权声明

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

          热门标签

          全站热门

          jquery图片轮播展示带文字带缩略图代码

          呆错免费开源图床系统源码

          高温+越障,追觅S50Pro水箱版仅需2673元,智能洗地新标杆

          网站网页内容文字禁止复制如何解决?

          WordPress图片主题Lovephoto2.0.2分享

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

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

          2024龙年除夕跨年烟花html代码大全