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

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

          WordPress无炸金花app下载免费最新华体育官网app下载入口版插件外部链接自动添加nofollow标签

          2025-06-22 19:13:39 318
          当然我们也可以通过代码实现无插件添加方法。这样所有的外部链接就会自动加上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 文件中,在技术层面是有传递出去权重。有时内容会引用华体育官网app下载入口或分享一些外部链接地址,炸金花app下载免费最新版

          在wordpress写文章时,

          如果手动每个链接加入是很麻烦,有些外部链华体育官网app下载入口trong>炸金花app下载免费最新版接是没有加Nofollow标签,当然目前一些wordpress主题设置有这个nofollow标签功能。严格要求的话是需要在外部链接全部加上nofollow标签。可以直接找一些wordpress插件安装。
          本文地址:http://8xhvv.xny028cc.com/grandfather/0-58.html
          版权声明

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

          热门标签

          全站热门

          dedecms织梦仿站工具软件下载

          CSS3浏览器前缀和长度单位rem

          dedecms文章栏目列表页标题增加序号

          帝国cms7.5登录密码忘记多次登录失败被锁解决办法

          卡通海底潜艇404页面动画特效

          CSS3变形效果transform

          wordpress主题纯代码禁止复制文章内容的方法

          wordpress时光轴博客主题webnus下载

          友情链接