September 23rd, 2008
Wordpress Keyword Link Plugin - 59
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
This is a little Wordpress 2.3+ plugin that helps you to automatically link defined keywords to certain articles on your own blog, or elsewhere on the internet.
A plugin that allows you to define keyword/link pairs. The keywords are automatically linked in each of your posts. This is usefull for improving the internal cross referencing pages inside your site or to automatically link to external partners (SEO).
Example: “A visit to the UK is not complete without a visit to Stonehenge.”
Would become: “A visit to the UK is not complete without a visit to <A href=”link”>Stonehenge</a>.”
You can decided for each link if you would like to:
- Add a “No Follow”
- Match only on the first mention
- Open a new window on clicking the link
- Match any case (ignore case) in the keyword
It is possible to CSS style links:
- If the link is an affiliate you would like to disclose
- Any other link tagged by the plugin
To help maintain longer keyword lists it is also possible to import and export lists of keywords to a comma seperated values (CSV) file, handy if you would like to edit the list of keywords in a spreadsheet.
Features
- Optional: Only link the first instance of a keyword [default is all]
- Optional: Open a new window for a link
- Optional: Mark a link as “nofollow”
- Optional: Ignore case when matching [Rome,ROME,ROMe]
Screenshot

Installation
- Just download the ZIP file, and unpack it in the /wp-content/plugins directory.
- Activate the plugin
- Enter your keyword-link pairs in the option panel for the plug-in.
v0.6
- It is now possible to use apostrophes in keywords (the boy’s hat)
- You can import and export the keyword list to and from a comma seperated filed
v0.5
- Fixed a “space” issue
- Added basic help to the configuration page
- Added support for affiliate links
v0.4.5
- Added: A little bit of javascript to allow for editing of existing keywords as some of you now have over 150 entries it will also jump to the editor at the bottom of the screen.
v0.4.2
- Fixed: Compatibly problem with Ozh Click counter plugin
v0.4
- Fixed the linking of matching url’s problem
- It is now possible to open a new window for a link (target=_blank)
- It is now possible to ignore case when matching a keyword
v0.3.1
It is now possible to specify per link if you would like to :
- Link only the first mention of the keyword in the article (or all, which is the default)
- Tag a link as “nofollow” , useful for external links.
The replacement routine is also smarter about linking keywords. For example: “magic” will match “magic” , but no longer to “magically”.
version 0.2
If you would like to modify the style of the link. For example to make the link bold add the following to your style.css file:
.bm_keywordlink { font-weight: bold; }









Except where otherwise noted, content on this site is
September 23rd, 2008 at 3:06 pm
[...] now, have a look at my Wordpress Keyword Link plugin. Share and [...]
November 16th, 2008 at 6:24 am
Hello,
Currently, there is no way to limit the number of times that the same URL can be hyperlinked. Google only counts the first occurrence of a link to the same URL, so I would like to set a limit of “1,” regardless of whether the keyword is different.
Also, where is my “BlogMechanics KeywordLink” database stored? What’s the name of the database? I can’t find it anywhere in my list of SQL databases.
Please advise.
Thank you!
November 16th, 2008 at 11:31 am
Hi Paul,
Correct — the plugin was written for cross referencing within a site, the use in SEO came only by accident. But thanks for the suggestion, I will add this to the todo list for this plugin.
On your second question, the plugin doesn’t need a seperate database to store its values. It uses the Wordpress “get_option” & “update_option” function to store its settings. (And these are stored by Wordpress in the wp_options table).
Martijn
November 21st, 2008 at 8:03 am
just installed! anywhere for anyone here to test and visit my website to see if installed and working properly?
November 27th, 2008 at 10:26 am
[Ralph] wrote me an e-mail saying that the Keywork link plugin didn’t work nicely with Ozh Click Counter plugin. Together they would eat the links.
I fixed the problem in 0.4.2
November 27th, 2008 at 4:26 pm
HEY Martijn,
I will write this comment instead of email.
I know what you mean, an configuration option is a better choice for English and Asian style linking.
but I think, as it’s simple, you can just mention it in the readme file, and let the users to change the source code by themselves.
There are other important functions you can consider to make this plugin better.
Just like, EDIT the existing keywords and links.
Hope you can have a better version soon!
Ralph
November 28th, 2008 at 4:55 am
“EDIT the existing keywords and links”
I certainly agree with that!
I would also love to see a version that uses fewer resources. Even though I only link to posts (no tags, categories, or archives) with about 150 terms, it’s still fairly slow.
Alas, it’s still a GREAT plugin! I’m just hoping that it gets even greater.
November 28th, 2008 at 1:55 pm
[Paul]
I think today’s update will make you happy ; I added an edit option to each tag. If you are indeed using 150 terms that should make your life a lot easier.
Fewer resources is going to be hard. The program simply applies each term to the content using the PHP preg_replace function. But with 150 terms it will have to loop 150 times over the content. WP-Super Cache might be the best solution to this I think.
[Ralph]
I haved added your comments on using the plugin with Chinese/Japanese etc to the readme.txt (installation section).
Many thanks for your comments!
November 29th, 2008 at 12:33 am
Hi Martijn,
Would it be possible for a future update to have a checkbox [is affiliate] and when ticked style the link class differently, e.g. .bm_keywordlink_affiliate or just .affiliate? I know this is another additional (and possibly) unforseen use of BM KeywordLink, but I’m also using it for tying certain keywords to affiliate partners, but would still like to disclose this fact to my readers. Hope this makes sense, otherwise shoot me an email and I’d be happy to explain it in our native language (assuming by your name your’re Dutch)
November 29th, 2008 at 2:34 am
[...] 这是插件地址:http://www.dijksterhuis.org/wordpress-plugins/keyword-link-plugin/ [...]
November 30th, 2008 at 2:59 pm
Thanks for the edit feature!
I noticed after I updated to the new version that it wrongfully inserts a blank space after each link, leaving a gap after linked words that are immediately followed by a period, comma, question mark, etc.
I hope you can fix that.
Thanks again!
November 30th, 2008 at 5:29 pm
@Jean-Paul
Hi! No candy for guessing. The special link feature sounds easy enough — I will add a tick box for that.
@Paul
I will find out what is causing the extra spaces and remove that, thats definately not a feature.
Thanks for the feedback!
Martijn
December 3rd, 2008 at 12:14 pm
Hi Everyone,
A requested I added an “affiliate” tag, it will generate a different <span> around each link.
I also fixed the additional space issue and added some basic help on the configuration screen.
December 4th, 2008 at 2:19 am
Superveel dank Martijn! / Excellent work Martijn, thank you!
December 10th, 2008 at 2:50 pm
Martijn, I found another bug. Keywords with apostrophes do not autolink. You cannot edit or delete them from the admin. If you click on “Edit” or “Delete,” nothing happens. Also, the keyword appears with a slash next to the apostrophe in the Wordpress admin, but not in the MySQL database admin.
December 13th, 2008 at 5:12 pm
The ability to import a text file and/or spreadsheet of keyword-link pairs would be AWESOME!
Thanks, Martijn!
December 13th, 2008 at 10:51 pm
Hi Paul,
I think I am going to ask you to submit work lists from here on
But the idea sounds easy enough. I will find some time in the coming week and add it in.
Cheers,
Martijn
December 19th, 2008 at 3:09 am
Hi… Excellent plugin!
Is it possible to have your plugin work with the Link Cloaking plugin for WP? I prefer your plugin for linking keywords; but it would be nice to be able to cloak the links as well.
(http://w-shadow.com/blog/2007/07/28/link-cloaking-plugin-for-wordpress/comment-page-8/#comment-13266)
December 26th, 2008 at 2:46 pm
Just released 0.6 which includes the requested comma separated values (CSV) import and export.
December 27th, 2008 at 6:52 am
Thanks, Martijn! Perfecto!
January 2nd, 2009 at 11:46 pm
[...] Keyword Link Plugin-网上找到了这个插件,测试了很多其他类似功能的插件后保留了这个插件,主要是在文章当中根据关键词添加链接的,插件的原版是针对英文开发的,对于中文的支持有很多问题,根据目前发现的问题做了简单修改,可以支持中文和批量增加关键词库了。但是还没有正式启用,主要是担心对于博客的访问速度有所影响。日后为了增加内链会考虑使用这把双刃剑。 [...]
January 3rd, 2009 at 5:24 am
Would it be possible for this to include custom fields? I’m setting up a store using WP, and have a custom field for the specifications of a product, which include a replacement part. I’d like to create a link from the replacement part to the blog entry using this plugin if at all possible. Thanks!
January 3rd, 2009 at 7:47 am
[...] I have been researching to find keyword link plugin which is able to add a hyperlink automatically for a specific keyword, and finally, found that Keyword Link Plugin[1][2] [...]
January 3rd, 2009 at 8:27 am
Hi, Thank you for sharing this plugin. It looks great plugin!
However, I have found one bug and since I need to use Asian Language, I need to modify the code. I wrote the note in my blog, ( http://blog.breadncup.com/2009/01/02/wordpress-plugin-keyword-link-plugin-modification-v06/ ), so, when you make a release next version, please refer to it.
Thank you,
January 8th, 2009 at 1:34 am
Excellent plugin. The export/import from excel is ideal for managing lists.
I have noticed two bugs with the options setting. Each time a keyword is edited, all of the options (NoFollow, First Only, etc) are checked, regardless of their current state, so that you must manually uncheck the options every time.
Also, when importing from excel, the IsAffiliate field is not imported, and always set to true, regardless of the checkbox, or the boolean flag.
These are just minor inconveniences, to an otherwise great plugin! Thanks. Keep up the great work!
January 15th, 2009 at 11:23 am
[...] Affiliate Link Plugin Needed I had a bigger list of these a while back but here are a few: Wordpress Keyword Link Plugin | Martijn’s C# Coding Blog thruSITES / The Cross-Linker Plug-in for WordPress WP-Plugin – GZ AutoLink WikiStyle [WordPress 2.1 [...]
January 29th, 2009 at 3:47 am
Looks like a neat plugin, but I am in search of a totally automatic solution.
I am working on a site, totally category-based, and I’d like to auto-replace words with their corresponding posts in a certain category.
Example: one category is called “Moderators”. Here are a bunch of posts that each show a photo, the bio etc. of a moderator.
And on all the other posts of the site, whenever a reference to a moderator is made, it should be auto-linked.
I guess it’d require a plugin that monitors posts in a certain category and adds the title + link to your plugin’s word-database.
Is that possble?
January 30th, 2009 at 1:36 pm
Hi Mores,
Certainly its possible but its such a specific feature that it wouldn’t make sense to add it to the default setup. Also are you thinking of adding hundreds of moderators? If not, maybe just doing it by hand would be easier.
Cheers,
Martijn
January 30th, 2009 at 9:42 pm
Thanks for replying, Martijn.
The number of moderators would be around a hundred with more being added on a near-weekly basis, and I want to keep things as simple as possible for the lady I’m building the site for.
I guess one would need a second plugin that adds moderators to the same DB you’re writing your replacement pairs into.
January 30th, 2009 at 10:19 pm
Hi Martijn,
Excellent plugin ! This was exactly what we were looking for. I’d like to know if there is a way you can enable the links to work in the comments as well ?
thanks !
February 2nd, 2009 at 10:46 am
Hi Bob,
Links in the comments shouldn’t be too much work, I will add it to the ToDO list.
Cheers,
Martijn
February 2nd, 2009 at 4:17 pm
Thanks Martijn, that’s very generous.
So it will be added in the next release of the plugin ?
February 2nd, 2009 at 5:31 pm
[...] Keyword Link Plugin [...]
February 5th, 2009 at 8:55 pm
I love this plugin.
Wondering if you can have some kind of precedence feature. Even if you just use insert order that’d work for me.
What I mean is, I want “widgets” to link to one URL, but “widgets for sale” to link to another, and I want “widgets for sale” to take precedence.
February 6th, 2009 at 11:11 am
@Chris
The precedence feature sounds interesting, and it shouldn’t be too hard to include. I will look if it works as I expect it too.
@Bob
I will add comments in links in the next release. Work permitting I should have time for that somewhere next week.
February 9th, 2009 at 7:02 pm
Thanks Martijn,
good luck !
February 10th, 2009 at 3:56 pm
I just uploaded v0.7 which add the following:
“Widgets for sale in America” now matches before “Widgets for sale” and “Widgets” independent of their order in the definition list
February 10th, 2009 at 10:32 pm
Thanks, I’m checking it out now Martijn
in other words ‘Dankjewel’
February 11th, 2009 at 11:36 am
Deleting Multiple Keywords Simultaneously
It would be very helpful to be able to delete multiple keywords at once, perhaps by clicking a check box that appears next to each keyword and then clicking a “Delete” button.
February 11th, 2009 at 11:45 am
@Paul
Good idea — I had the same problem when testing things. Will definitely add it.
February 11th, 2009 at 2:32 pm
Hi,
Thank you for good plugin.
Today, I found a small bug with this plug-in. If there is no list for links, it gives following warning message:
“krsort() expects parameter 1 to be array, boolean given in /wp-content/plugins/blog-mechanics-keyword-link-plugin-v01/bm_keywordlink.php on line 381″
February 11th, 2009 at 4:09 pm
Fixed. This would only happen if the required option didn’t exist. The code now first checks if it exists to avoid the ugly warning.
February 12th, 2009 at 2:26 am
Thank you for adding the reverse sort!
February 13th, 2009 at 5:55 am
Re: “Deleting Multiple Keywords Simultaneously”
I forgot to mention (but I’m sure you already know) that there should also be a “Select All” button to make it easier for those of us who have 100+ terms.
Thank you!
February 13th, 2009 at 9:11 am
Nice! Thanks for the reverse sort.
February 14th, 2009 at 10:18 pm
Hi, The new one 0.7 can’t not work in Chinese at all. Even though I have deleted the “/b” in the file. Please check,
Thank you!
March 28th, 2009 at 6:24 pm
[...] 前2天发现了一个。叫Blog Mechanics Keyword Link 可以完成这个功能。 [...]
April 6th, 2009 at 1:26 pm
很不错的一个插件!good!thank you!
April 7th, 2009 at 2:06 am
[...] Keyword Link Plugin [...]
April 9th, 2009 at 5:35 pm
Hi, I’m using the plugin and I appreciate it very much.
Recently I noticed the plugin breaks the image captions when the text inside them includes a keyword to link: the result is that only the image is shown, but not the text, and the image alignment is changed. Would it be possible to make the plugin not word inside the image captions?
April 12th, 2009 at 1:41 pm
can you make the next version support Chinese?many Chinese blogers used this plugin.i can help you!
April 16th, 2009 at 4:11 pm
WordPress 自動建立關鍵字連結外掛 BlogMechanics KeywordLink…
緣起是本站的這篇文章中「kyo」的提問,這才使得直角兄花點功夫去找這一類的外掛。經驗談可以看看本篇文章的前身文,接下來直角兄就直接進入本文的重點了。
想要在 WordPress 的文章中,…
April 16th, 2009 at 10:48 pm
Does this work with WPMU? I put it in but it doesn’t seem to be showing up on the site. Everything is working fine in the backend, but nothing is showing up on the keywords.
Thoughts?
TA
April 28th, 2009 at 12:16 am
Brilliant stuff. I looked at a bunch of plugins to do this before I decided on yours. What I’m looking for is a plugin that will make changes to the content of the database thought. I have a number of people who poll my feed and then put my content into their blogs. I’d like to include a keyword link back to my site somewhere in the first paragraph or so.
If they’re going to take my content, I’d love a keyword link, you know?
I’m hoping this plugin makes changes to the content, and not on the fly.
April 28th, 2009 at 8:30 am
The plugin you are looking for is the DoFollow plugin by Joost de Valk.
http://yoast.com/wordpress/rss-footer/
It allows you to add a tag line to your RSS feed. Works great for my own content that ends up all over the place.
July 3rd, 2009 at 12:15 am
am i just not seeing it – is there a separator for linking multiple keywords/phrases simultaneously?
for example i want to link both “conductive thread” and “conductive threads” to the same post.
is it possible to type “conductive thread|conductive threads” or use some other separator symbol in order not to have to create multiple entries?
also i would find it helpful if the list of linked keywords would be ordered alphabetically, so that one can maintain an overview of what has already been linked. but i can see how it is also useful that they are ordered by newest last.
thanks for the plug-in it is very helpful and well done.
July 5th, 2009 at 9:55 am
Hello. I think that it is an excellent plug-in. Thank you.
July 9th, 2009 at 7:36 pm
Hi Martijn,
Your plugin is great and I have installed it successfully in my wordpress blog (Using Wordpress 2.8)
However, I got problem in Adding my keyword.
After I input the Keyword and Link to the page, it showed the keyword in list (Be the first one) , however, when I reload the page or try to add another, it will become blank. It seem the Keyword is not going to save.
I have tried to turn off all my other plug-in , but it still no effect and cannot save..
And I have try chmod the plugin folder and file to be writable , no effect
Do I need to create a DB for this plug-in ?
My Host is using PHP Version 4.4.8
Thank for help.
July 9th, 2009 at 11:15 pm
Hi again,
After reviewed the DB of wp_options which store the bm_keywordlinkoption, it is showing the below :
a:1:{s:6:”伊藤\”;s:68:”http://abc.com|0|0|0|0|1|0|1″;}
The problem is caused by the Japanese keyword 伊藤 stored with a “\” , it made the options page and plugin cannot load the data.. However, I found that for some keyword such as 鈴平ひろ have no problem at all ..
When I removed the “\” by using phpMyAdmin manually, the data is showing back in options page and plug-in is working fine..
However, when I try to add an other one or edit , the problem happen again ~________~
I have followed your readme to edit the code to support Chinese and Japanese word..
What should I do ? Thanks