Wordpress No-follow hack

Following on from yesterday's post I thought I would investigate to See if there was a plug-in which defaulted all outgoing links from posts to "nofollow" but could be easily changed to a "dofollow" without the need to fiddle about with code. After much scouring and searching the web I managed to find a plugin which is available for the wordpress WYSIWYG editor.

The actual editor in Wordpress is an open-source editor called TinyMCE distributed by Moxiecode and the full version (wordpress generally comes bundled with a slightly striped down version) comes with loads of handy plug-ins to give you more control over how you publish. One of these plugins is called Advlink and gives you more control over how your links are displayed and lets you add tags and attributes to links via pull-down menus without having to manually type in code. I have altered the plugin slightly so it defaults to a nofollow tag saving you "Leaking google Pagerank" but is easy enough via a pull-down menu to set the link to a dofollow to share link love!

Currently I can only get this to work in Internet Explorer but I'm looking for a fix for Firefox, I expect this to be sorted out by the next release. Below is a screen-shot of the Advanced link editor, I haven't fully investigated all of the other linking options available but you can see that it is fully featured!

nofollow-hack-screenshot.jpg

IMPORTANT:Please back up your current Tiny_mce installation if you are unsure about anything. I cant be held responsible if you mess up your WYSIWYG editor.

Installation

Ive altered the plugin and the config file so all you need to do to use this plugin is unzip the file once you have downloaded it and install the files to the appropriate directories.

  1. Download the nofollow hack files here: nofollow_hack.zip
  2. Upload the entire Advlink folder into the tinymce "plugins directory" the path should be as follows: mysite>wp-includes>js>tinymce>plugins
  3. Upload the tiny_mce_config.phpfile to the "tinymce directory" and overwrite the old one.
  4. That is it, the plugin is now installed!

Now when you use the link button in the WYSIWYG editor to hyperlink you will be given extra linking options, the default "rel" value is set to nofollow but if you go into the advanced tag and next to the "relationship page to target" option you can change this to "dofolow" or any of the other options and the code is updated automatically!

Changing the default

The downside to this is that you may forget to follow good articles which you have linked to and inadvertently rob people of potential link love if you would lie to turn the no follow default off its quite simply a case of changing a couple of lines of code. To do this all you need to do is locate the link.html file which will be inside the Advlink folder inside the Tinymce plugins directory. Open this up in any html editor and locate these two lines of code located around line 199.

HTML:
  1. <option value="nofollow" selected="nofollow">No Follow</option>
  2. <option value="dofollow">dofollow</option>

and replace them with this code:

HTML:
  1. <option value="nofollow">No Follow</option>
  2. <option value="dofollow selected="dofollow"">dofollow</option>

Alternativey you can dowload the same plugin with the above changes already defaulted for you as dofollow here: dofollow_hack.zip

Please let me know what you think of this Plugin Hack!

If you enjoyed this post please feel free to buy me a gingerbread late! mmmm!

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Technorati
  • DZone
  • StumbleUpon
  • Furl

Tags:

No Tags

4 Responses to “Wordpress No-follow hack”


  1. 1 Dave Davis

    Are you for real?

    Andy, I have nothing against you personally, but my God are you going about things backwards.

    First of all, you have nofollowed all your internal links to your own posts. Think about that. A nofollow attribute is an "I don't vouch for this link". Think about it. Now think about it some more.

    Now, you are clearly OBSESSED with pagerank. That's fine. Most of us were when we first started out. Pagerank "leak" does not exist in the sense you think it does. Forget about leaking it out or leaking in any sense. It's not like a bucket where you "collect" it and retain it.

    Now, think of your obsession with pagerank. You clearly want some green bar. If EVERYONE nofollowed their links the way you do, you would have NO pagerank yourself.

    I HIGHLY recommend that you read up a little more on pagerank and how it is calculated as what you are doing is going to hurt your site.

    I'm not having a go at you, I'm just saying, you have a lot to learn and right now, you have it all wrong. I would concentrate on your content and FORGET about pagerank. It will consume you.

  2. 2 Court

    This is very good stuff Andy. I've been trying to find a similar hack that does this with comment links. I currently have the dofollow plugin installed, and want to change it so that those that leave valuable comments 'earn' a real link. The rest will be left with nofollowed ones. There are too many people taking advantage of the whole concept behind the 'dofollow movement'. I think you're on the right track, don't nofollow any links that have related subject material though!

    Keep up the good work!

  3. 3 Andy

    Thank you for that tip Dave, the whole exercise for me with this was hacking the plugin. I saw something I wanted to do and figured out how I could do it!

    Court, I may have a look at seeing how you could add maybe radio buttons to "nofollow" or "dofollow" comments.

    Andy

  4. 4 mobile phone

    Hi, after reading all posts on this page, I thought it might be appropriate to mention that I found your blog via a google search. I was looking for mobile phone related info and technology and hey presto found you. I agree with poster Dave Davis who highlights one of the most poular pit-falls of SEO concerning being obcessed with page rank. I do feel he raises some valid points. Hope to be visiting you a lot more in future, it's good to find a blog in the blogesphere where contributors actually talk sense. Personally, I find Wordpress to be heads above the competition. But that's just my 2 cents worth.

    Galantix360

Leave a Reply