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

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

          WordPress无赏金女赛车彩票平台app财富王官网下载插件外部链接自动添加nofollow标签

          2025-06-24 03:44:13 1
          当然我们也可以通过代码实现无插件添加方法。有些外部链接是没有加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 文件中,当然目前一些wor赏金女王官网下载赛车彩票平台app财富ong>dpress主题设置有这个nofollow标签功能。有时内容会引用或分享一些外部链接地址,可以直接找一些wordpress插件安装。如果手动每个链接加入是很麻烦,$$$$$赏金女赛车彩票平台app财富王官网下载$在wordpress写文章时,

          这样所有的外部链接就会自动加上nofollow标签。在技术层面是有传递出去权重。
          本文地址:http://nzjg3.xny028cc.com/most/7-921415.html
          版权声明

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

          热门标签

          全站热门

          搜索引擎搜索关键词的标题与链接如何提取?

          boke字母拼音是什么意思?

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

          HTML网页植物大战僵尸源码分享

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

          米家智能鱼缸,超值好价!远程投喂+半年免换水,养鱼新体验

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

          WordPress音乐主题Always1.8使用教程

          友情链接