Super Version of the SH-Autolink Plugin for Wordpress
The Wordpress plugin SH-Autolink is pure gold if you, like me, hate setting up internal linking on your website. The plugin automatically transforms specific words into links, so you don’t have to worry about doing it yourself. Excellent if you have hundreds of posts that you no longer remember, potential affiliate links that you always forget about, etc.
I use SH-Autolink here on sethson.com, but I had a few problems with it when I started out:
- The plugin transform all occurrences of the words you have specified, not just the first occurrence of each word in a post. That means a lot of links if you write about ‘mountain bikes’ and have specified ‘bikes’ as a word that must be transformed.
- The plugin transform subheaders if your specified words occur there. That means ugly headers that will hurt yours eyes.
New Functionality
I couldn’t live with that, so I decided to modify the plugin and make a slightly better version. My modified version does the following in addition to the normal SH-Autolink functionality:
- It only transforms the first occurrence of each specified word in a post.
- It doesn’t transform words in subheaders (H2 tags in my world, but you can easily modify the code if subheaders are for example H3 in your world).
- It automatically transforms the singular form of the words if the plural form can’t be found in the post (still only first occurrence of each specified word and only if the plural form is specified and ends with an ‘s’).
- It allows alternative words (words that must be transformed if the normal words can’t be found in the post).
- It doesn’t convert words in pages, only in posts. You can comment out one line of code if you want to convert words in both pages and posts.
Download SH-Autolink Super
You can download my version of the SH-Autolink plugin here (zip-file, version 0.01 beta). I have named it SH-Autolink Super…
My version is based on SH-Autolink 0.94 Beta and it also comes with the GPL license.
Feel free to write your feelings about SH-Autolink and SH-Autolink Super below.
on March 23rd, 2008 at 12:27 pm
I want use in MU Wordpress, but not working. Can I use only wordpress single?
on March 23rd, 2008 at 8:07 pm
I haven’t tested it with MU, so I don’t really know if it only works with the normal Wordpress.
on April 4th, 2008 at 1:29 am
I had sh-autolink previously installed and when i try your plugin i get in the posts WordPress database error: [Unknown column ‘altkeyword’ in ‘field list’]
SELECT id, url, keyword, altkeyword, protocol, target FROM wp_shautolink …also the manage page is the same as in 0.94, no altkw
on April 4th, 2008 at 4:24 pm
The manage page is the same, it didn’t change that one (I use SQLyog instead, it gives direct table access and is much faster to use).
on May 2nd, 2008 at 7:02 am
Great idea Brian,
How can I exclude other tags like to be converted in pages? An entire class or id?
I tried to apply a H2 to the text I don’t want to be converted in pages in my sidebar, but it didn’t work. example: Text not be coverted in pages
Thanks
on May 3rd, 2008 at 2:51 pm
Hi Nuno,
It only works for the page/post text itself, not text in the sidebar.
You can change the source code if you want to exclude other tags.
on July 29th, 2008 at 12:04 pm
The Ninja Affiliate Linker is a much better plugin with far more features. You can get it at : http://herbscancure.com/blog/ninjatool
A must-have for all kinds of affiliates.
on July 29th, 2008 at 7:11 pm
Maybe. I haven’t tried it since my plugin is free and Ninja Affiliate Linker cost $127
on September 4th, 2008 at 8:43 pm
Hi, brian i tried your plugin and i get this error message im a newbie when it come to coding so can you help?
Warning: Wrong parameter count for preg_replace() in /home/bl4xxx/public_html/phatbuttmovies/blog/wp-content/plugins/sh-autolink-super.php on line 152
on September 4th, 2008 at 11:22 pm
Hi Tony,
What version of WP are you using?
on September 26th, 2008 at 4:28 am
Hi Brian
I have install your SH-autolink-super
but not runs
I have WP 2.6.2
you can check at
http://www.2.4ghz.es
Thanks for you help
Santiago
on November 11th, 2008 at 3:27 am
Hey,
I’ve started working with the plug in but have run into a problem. When I try to edit or delete a keyword it says it can’t find sh-autolink.php. I went in and changed it to sh-autolink-super.php but that only changed the reported missing file.
Any suggestions?
on November 13th, 2008 at 11:25 am
Thanks for producing this plugin, I’d been looking around for something like this for ages (that didn’t cost $100!). I’ve just downloaded it now, fingers crossed I don’t have any of the problems other people have had.
on November 16th, 2008 at 11:51 pm
I like what it does but if I want to delete a keyword that I set up it gives me a 500 Server Error after I press delete and it doesnt go away, thoughts