My *nix world

How to link keywords to Wikipedia automatically

Just to help my blog being user-friendly I have created a simple plugin for WordPress that basically analyzes your web page content and links some words (those it decides that are important) to their respective Wikipedia page. This is the short story. For the long story keep reading the paragraphs below.

Link keywords WordPress automatically

This plugin parses your web page content to find those words that start in upper-case, have a length of at least three characters and are not so common¹. If such words are found then the plugin linkify them by surrounding them with a anchor that points to their respective Wikipedia web page (if any, otherwise they are just ignored).

link keywords wordpress

By eliminating the most common words from the possible set of words we end up with those that have either a technical means, are acronyms or they just name something important which, your visitors, might not be fully aware of their meaning. Here comes in rescue Wikipedia with its great encyclopedia.

So this plugin creates a transparent link between your web visitor, the content of your website and Wikipedia, thus Wikipedify.

Of course, there are situations when the wikipedified words are not something that we actually want to linkify, also to link toward Wikipedia. What can we do about it? Well, the plugin recognizes the difference between a normal visitor and the author of the page. If you are just a simple visitor then you cannot do too much about it, just take it or leave it (will you allow the visitor to customize/change the way that your website looks like? I don't think so!). On the other hand if you are the page author and, of course, you are logged within your WordPress website, then the plugin will know that you are in fact the author/admin and it will provide an additional option for you (just above the wikipedified word) that allows you to add that particular word to the list of the most common words. By doing this all the occurrences of that word will not be wikipedified anymore in any page of your website, although you can edit later that list and undo this action if you want too.

link keywords wordpress

The plugin will also cache locally the keyword - i.e. the Wikipedia URL pair - so that once it knows the adequate URL for a keyword then it never ask Wikipedia about it, thus everything works fast and smooth (from local cache).

¹ they are not part of the most common words; for English language see and

You can download this plugin from its web page. Click here.

Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.

The following two tabs change content below.
How to link keywords to Wikipedia automatically

Eugen Mihailescu

Founder/programmer/one-man-show at Cubique Software
Always looking to learn more about *nix world, about the fundamental concepts of math, physics, electronics. I am also passionate about programming, database and systems administration. 16+ yrs experience in software development, designing enterprise systems, IT support and troubleshooting.
How to link keywords to Wikipedia automatically

Latest posts by Eugen Mihailescu (see all)

Tagged on: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *