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

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

          WordPress无真人澳门投注网插件问鼎下载链接入口安卓怎么下载外部链接自动添加nofollow标签

          2025-06-19 21:02:55 22653
          这样所有的外部链接就会自动加上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 文件中,真人澳门投注网

          在wordpress写文章时,当然目前一些wordpress主题设置有这个nofollow标签功能。有些外部链接是没有加Nofollow标签,可以直接找<问鼎下载链接入口安卓怎么下载strong>真人澳门投注网一些wordpress插件安装。如果手动每个链接加入是很麻烦,

          严格要求的话是需要在外部链接全部加上nofollow标签。
          本文地址:http://uy1t7.xny028cc.com/proposal/2025-06-18-06-16-19-3.html
          版权声明

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

          热门标签

          全站热门

          html+js简洁的音乐播放器,总有一款适合你

          wordpress拖拽图形验证码插件Fancy

          WordPress微博主题模板TleWeiboFor2.0

          js实现手机访问网页自动跳转到手机移动页面

          HTML5全民飞机大战网页小游戏源码

          Adobe Photoshop 2018中文版下载安装

          jQuery弹出层页面社交分享代码

          站长搭建个人博客网站的N个理由

          友情链接