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

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

          WordPr九游互娱软件下载ess无闲娱游戏插件外部链接自动添加nofollow标签

          2025-06-23 15:32:05 822
          严格要求的话是需要在外部链接全部加上nofollow标签。

          有时内容会引用或分享一些外部链接地址,

          在wordpress写文章时,在技术层九游互娱软件下载ng>闲娱游戏面是有传递出去权重。当然我们也可以通过代码实现无插件添加方法。

          //文章自动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标签功能。如果手九游互娱软件下载trong>闲娱游戏动每个链接加入是很麻烦,这样所有的外部链接就会自动加上nofollow标签。有些外部链接是没有加Nofollow标签,可以直接找一些wordpress插件安装。

          本文地址:http://abaep.xny028cc.com/contribution/9.html
          版权声明

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

          热门标签

          全站热门

          织梦dede:arclist标签使用说明

          苹果酝酿智能家居新布局?'homeOS'商标申请引发热议

          SEO网站编辑文章如何伪原创

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

          HTML5实现人工智能中国象棋网页小游戏

          科沃斯T50 Pro扫拖机器人水箱版,3999元降至2235元,百亿补贴优惠不妥协

          健康能量评估神器荣耀手表 Fit正式发布:轻享运动健康,499元起,你准备好了吗?

          微软Microsoft Edge Image Editor扩展如何关闭?

          友情链接