Wordpress Plugin Nofollow External Links ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AdultKing
    Raise Your Weapon
    • Jun 2003
    • 15601

    #1

    Wordpress Plugin Nofollow External Links ?

    Do you use a nofollow external links plugin, if so which one ? There are a few, which is the best ?

    thanks in advance.
  • just a punk
    So fuckin' bored
    • Jun 2003
    • 32393

    #2
    http://www.semiologic.com/software/external-links/
    Obey the Cowgod

    Comment

    • AdultKing
      Raise Your Weapon
      • Jun 2003
      • 15601

      #3
      Any more suggestions for a nofollow external links plugin ?

      Comment

      • fris
        Too lazy to set a custom title
        • Aug 2002
        • 55679

        #4
        Originally posted by AdultKing
        Any more suggestions for a nofollow external links plugin ?
        dont really need a plugin, try adding this to your functions.php file in your theme

        Code:
        add_filter('the_content', 'my_nofollow');
        
        function my_nofollow($content) {
            return preg_replace_callback('/<a[^>]+/', 'my_nofollow_callback', $content);
        }
        
        function my_nofollow_callback($matches) {
            $link = $matches[0];
            $site_link = get_bloginfo('url');
        
            if (strpos($link, 'rel') === false) {
                $link = preg_replace("%(href=\S(?!$site_link))%i", 'rel="nofollow" $1', $link);
            } elseif (preg_match("%href=\S(?!$site_link)%i", $link)) {
                $link = preg_replace('/rel=\S(?!nofollow)\S*/i', 'rel="nofollow"', $link);
            }
            return $link;
        }
        Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

        Comment

        • just a punk
          So fuckin' bored
          • Jun 2003
          • 32393

          #5
          Modifying functions.php is not a good idea because the theme can be changed or updated. Plugin is always a better solution. Its easier to enable/disable/update/modify/remove etc.
          Obey the Cowgod

          Comment

          • V_RocKs
            Damn Right I Kiss Ass!
            • Nov 2003
            • 32449

            #6
            These are the droids you are looking for:

            Nofollow Links

            It will show up under tools... It'll list all of your links... just check box the once you want a nofollow on... done...

            Comment

            • AdultKing
              Raise Your Weapon
              • Jun 2003
              • 15601

              #7
              Thanks everyone.

              Comment

              • fris
                Too lazy to set a custom title
                • Aug 2002
                • 55679

                #8
                Originally posted by cyberxxx
                Modifying functions.php is not a good idea because the theme can be changed or updated. Plugin is always a better solution. Its easier to enable/disable/update/modify/remove etc.
                not really, if its your own theme i would rather have it in my functions.php file than having plugins to do so.

                i could understand if its a theme from the codex which will autoupdate or something like that, but if its something custom to me, i do it this way.
                Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                Comment

                • just a punk
                  So fuckin' bored
                  • Jun 2003
                  • 32393

                  #9
                  Originally posted by fris
                  not really, if its your own theme i would rather have it in my functions.php file than having plugins to do so.
                  The reason?
                  Obey the Cowgod

                  Comment

                  Working...