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

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

          WordPress无九游娱乐下载链接大全网投真人实体靠谱平台插件外部链接自动添加nofollow标签

          2025-06-22 19:54:01 5
          严格要求的话是需要在外部链接全部加上nofollow标签。在技术层面是有传递出去权重。当然目前一些wordpress主题设置有这个nofollow标签功能。

          在wordpress写文章时,可以直接找一<网投真人实体靠谱平台strong>九游娱乐下载链接大全些wordpress插件安装。这样所有的外部链接就会自动加上nofollow标签。有些外部链接是没有加Nofollow标签,

          如果手网投真人实体靠谱平台rong>九游娱乐下载链接大全动每个链接加入是很麻烦,当然我们也可以通过代码实现无插件添加方法。有时内容会引用或分享一些外部链接地址,

          //文章自动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://d9lo4.xny028cc.com/secure/2025-06-21-13-58-41-8.html
          版权声明

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

          热门标签

          全站热门

          分类目录缩略图自动截图/生成api有哪些

          网站SEO内容优化注意事项

          wordpress网站换域名搬家后打不开解决方法

          天猫精灵:跨设备连接领跑行业,品类覆盖引领消费新潮

          fiddler2抓包工具中文汉化版下载

          wordpress时光轴自适应主题jinsomB模板

          HTML5实体/核心构成的元数据以及全局属性

          个人网站文章撰写建议及规范

          友情链接