GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Wordpress Plugin Nofollow External Links ? (https://gfy.com/showthread.php?t=1023498)

AdultKing 05-20-2011 10:22 PM

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 05-21-2011 12:05 AM

http://www.semiologic.com/software/external-links/

AdultKing 05-21-2011 09:38 AM

Any more suggestions for a nofollow external links plugin ?

fris 05-21-2011 07:08 PM

Quote:

Originally Posted by AdultKing (Post 18156499)
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;
}


just a punk 05-22-2011 12:04 AM

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.

V_RocKs 05-22-2011 02:14 AM

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...

AdultKing 05-22-2011 04:25 AM

Thanks everyone.

fris 05-22-2011 10:13 AM

Quote:

Originally Posted by cyberxxx (Post 18157489)
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.

just a punk 05-22-2011 10:24 AM

Quote:

Originally Posted by fris (Post 18158066)
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?


All times are GMT -7. The time now is 11:46 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123