AutoMeta: Automatic Meta & Technorati Tags for WordPress
This plugin will automatically generate and include HTML Meta Tags and Technorati Tags based on the full text of your post.
What’s it for?
The explosion of people with their own websites (often called ‘blogs) has gone hand in hand with the rise of automated aggregation systems, which attempt to filter out the irrelevant majority so that the end user sees more content that is useful. The digital equivalent of separating the wheat from the chaff.
Sites such as Technorati have taken this concept further by introducing the concept of tags. A tag is a word or phrase that describes what a particular web page is about. It’s essentially a proprietary version of the HTML meta tag – this plugin manages both kinds of tags for you.
Installation instructions
To use it:
Download this file – this is the stable release, which is what most people want – if you’d like to try an advance copy of the next version then scroll down- Unzip the file and copy it’s contents to your
/wp-content/plugins/directory (so that it’s path is/wp-content/plugins/autometa/). - Enable it on the plugins page.
- Look for the AutoMeta menu which appears on the plugins page once the plugin is enabled.
- Click the “Add the index” button to create the necessary indexes.
- That’s it.
Automatic Tag Generation
This plugin will automatically generate and include HTML Meta Tags and Technorati Tags based on the full text of your post. When you save your post (and before you publish it) the plugin checks to see if any tags have been associated with it.

If no tags are found then it generates them based on the content of the post.
Hand Written Tags
Automatic extraction of words can never be perfect, so once tags are generated they can be edited and improved by hand.
If, like me, your article goes through several drafts before publication then you’ll notice that the words are generated the first time you save the document, but then they remain unchanged as the finished document evolves. The plugin will automatically regenerate the tags whenever there is no autometa custom field, so if you click on the Delete action, you’ll get a fresh set of auto-generated tags that you can refine by hand.
Hints
I don’t recommend that you use the plugin without hand-tweaking the tags; instead, think of it as a useful guide. If you wish to include tags with a space such as “world wide web” then you should insert dashes where you’d like the spaces to be, i.e. “world-wide-web”.
FAQ
- Where can I see the tags/keywords in my output?Meta Keywords are added to the document header for each post (you won’t see them on the index page), so load one of a recent post in your browser (one that that you’ve written or saved since the plugin was installed) then view the source of the page. Near the top you’ll see a message detailing the version of autometa that’s in use, and a list of keywords. Technorati tags are either added to the footer (so scroll to the bottom) or, if you’re using a more recent release, the tags may have been included in the document body, so you’ll see them without looking at the source.
- The plugin is installed and appears to work, but I see just a set of empty quotes where the list of tags should be; what’s wrong?99 times out of 100 you are hitting a bug that existed for a very short time in WordPress 2.0 – it’s been solved as of WordPress 2.0.1, so the problem should disappear when you upgrade.
- How do I show the Technorati Tags in my sidebar/theme?If you want to add the tags to your sidebar, then that add
<?php AutoMeta::includeTechnoratiTags();?>to your theme wherever you want the taglist to appear. - Can I customize the output a bit?Yes, you can customize the output a lot. Use the more parameterized
<?php AutoMeta::echoTechnoratiTags("headline", "tail", "line prefix","line_suffix", "no_tags_message");?>, modifying the parameters as necessary to fit your theme. For example:<?php AutoMeta::echoTechnoratiTags("<h1>Technorati</h1><ul>", "</ul>", "<li>","</li>", "Zarro Taags!");?> - Do I have to have the tags on my page?No. Technorati can discover your tags from the feed (where the tags are included as categories), so (based on experience) it appears that you don’t need visible tags on your page, so just include them if you want to.
- I want to be as lazy as possible, can the plugin do it’s work when I publish without me having to save it?Yes, that’s the default behaviour, but there is a caveat. If you want to be lazy and just publish then that’s fine, you can, the plugin will still extract the most important words from the article and turn them into tags/keywords. The downside is that if you’ve not mentioned a term in an article then it cannot appear as a tag – so if (for example) you write an article about iPods and don’t mention Apple, then “Apple” can’t be a tag, so there’s an audience group that you’re possibly missing. This is why hand-finishing your tags is recommended.
- Can I create keywords/tags that are not just single words, like “mostly harmless”, “ford prefect” or “chesterfield sofa”?Yes. These can be created using either the minus or plus characters to separate the words you wish to join. The tags “ford-prefect” and “ford+prefect” both turn out as “ford prefect”. It is recommended that you use the “+” character; the “-” is a hangover from an earlier version and (if people request it) could one day be removed to allow for hyphenated tags.
Planned/Unplanned Features
I don’t have time to extend this at the moment, but I’d like to to have:
- default set of metadata/tags for use in non article pages
- a better admin interface
- user editable tag list length
- user editable the minimum word length
- user editable stop list
- thesaurus lookup, so similar words could be group scored
- Optional Visible/Invisible technorati tags
- Tag list in Admin side bar
Versions
A list of all the releases.
Contribute
Embrace and Extend
If anyone would like to extend it, or use the code elsewhere, it’s released under a GPL license. Derivative works must also be free and must credit this work.
Alpha/Beta Testing
A development version of the next release is sometimes available too [nothing is currently available]. If you’re familiar with PHP and comfortable with wordpress hacking, then please, be my guest and help with giving it a jolly good shake to help get all the bugs out. If you’re feeling creative, invent a feature, or try implementing one of the ones listed above. Many hands make light work!
Feedback
Ideas, opinions and descriptions of problems are what can help this plugin get better – share your sparks of inspiration on the forum (or just describe the mists that are clouding your way).
445 Comments
Hi Coffee – that’s an “easy” one to answer. The threshold is a score threshold, not a number of words to match. All words that score above the threshold value value will be returned. If there are n words that score above the threshold, then the highest of these are skimmed off the top and returned (using $autometa_maxWords).
So, if you want 7 words, try:
$autometa_threshold=0.1
$autometa_maxWords=7;
At least; that’s how it should work; so let me know if it doesn’t!
Hi Rich
Your prompt assistance is truly appriciated.
I have been fidling with autometa 0.5a now, and it appears to do what I want it to.
One detail keeps bugging me though: My blog is about coffee, I use the word a lot (usually no. one or two highest word count – common words aside), and yet the word coffee never made it to the autometa keyword section. Is that the way it is supposed to work?
(my website is http://www.coffeecoffee.be)
It does not indicate anything leaves incomplete. As sera the reason?
Thanks
Oscar
Nice plugin, rich!
I hacked the code such that the hidden div is visible instead of hidden. This way I can see the “links”, edit them if necessary while my readers get to click on them to find related blogs by searching in Technorati.
But as of version 0.5a, the plugin inserts the div even when the page in concern has no autometa. Would you consider changing the codes such that if there’s no autometa the plugin doesn’t insert the div at all please? Thanks.
(off topic) Btw the “bookmark on del.icio.us” link doesn’t work. I believe the correct format should be “http://del.icio.us/post?url=http://www.blablabla…”
Ah, excellent. It’s working a treat now that I’ve edited functions.php. Thanks!
One niggling detail: Technorati seems to prefer that links for multi-word tags use a + instead of %20 between words — at least, when one searches for a multi-word tag that isn’t found, the suggested format for the tag’s link is: <a href=”http://technorati.com/tag/tag+with+spaces” rel=”tag”>tag with spaces</a>. It doesn’t really seem to matter — %2B, + and %20 appear to be parsed the same by technorati — but it might be nice if Autometa treated a + the same as a – when generating keywords.
I would suggest that the plugin can also allow us to enter “description” for the meta tag. For the time being, we can only add “keywords”. How about “description”? It would benefit publisher if each post have their own description as well.
Btw, thanks 4 d plugin.
This is the Empty Word List for french :
$autometa_common = array( “à ”,”allô”,”aucuns”,”auriez”,”auxdits”,”aviez”,”ayons”,”bof”,”çà ”,”certaines”,”chez”,”comment”,”da”,”desquels”,”deviez”,”devras”,”doit”,”dues”,”dût”,”es”,”êtes”,”eurêka”,”excepté”,”fouchtra”,”fûmes”,”ho”,”hurrah”,”laquelle”,”leur”,”mazette”,”mâtin”,”ne”,”nulle”,”or”,”outre”,”pas”,”plein”,”pourraient”,”pourvu”,”pouviez”,”puis”,”pussent”,”que”,”quoi”,”saperlipopette”,”serait”,”sien”,”sommes”,”ta”,”telles”,”touchant”,”une”,”veuillez”,”voilà ”,”voudrez”,”voulante”,”voulue”,”vôtre”,”afin”,”alors”,”auquel”,”aurions”,”auxquelles”,”avions”,”aïe”,”boum”,”car”,”certains”,”chic”,”concernant”,”dans”,”devaient”,”devions”,”devrez”,”doive”,”duquel”,”eh”,”et”,”étiez”,”eus”,”eûmes”,”furent”,”fût”,”holà ”,”hé”,”le”,”leurs”,”me”,”miséricorde”,”ni”,”nulles”,”ôté”,”palsambleu”,”patatras”,”plouf”,”pourrais”,”pouvaient”,”pouvions”,”puisque”,”put”,”quel”,”quoique”,”sapristi”,”seras”,”sienne”,”son”,”tandis”,”tels”,”tous”,”unième”,”veuillons”,”vos”,”voudriez”,”voulantes”,”voulues”,”vôtres”,”ah”,”apr.”,”aura”,”aurons”,”auxquels”,”avoir”,”bah”,”bravissimo”,”ce”,”ces”,”chiche”,”contre”,”de”,”devais”,”devoir”,”devriez”,”doivent”,”durant”,”elle”,”étaient”,”étions”,”eusse”,”eût”,”fus”,”fûtes”,”hop”,”il”,”ledit”,”lorsque”,”merci”,”moi”,”nonobstant”,”nuls”,”ou”,”pan”,”pechère”,”plus”,”pourrait”,”pouvais”,”pouvoir”,”puisse”,”pécaïre”,”quelle”,”rataplan”,”sauf”,”serez”,”siennes”,”sont”,”tant”,”tes”,”tout”,”unièmes”,”veulent”,”votre”,”voudrions”,”voulants”,”voulurent”,”zut”,”ai”,”as”,”aurai”,”auront”,”avaient”,”avons”,”basta”,”bravo”,”ceci”,”cet”,”chouette”,”corbleu”,”debout”,”devait”,”devons”,”devrions”,”doives”,”durent”,”elles”,”étais”,”être”,”eussent”,”eûtes”,”fusse”,”grâce”,”hormis”,”ils”,”lequel”,”lui”,”merde”,”moins”,”nos”,”ô”,”où”,”par”,”pendant”,”plusieurs”,”pourras”,”pouvait”,”pouvons”,”puissent”,”pût”,”quelles”,”revoici”,”se”,”seriez”,”siens”,”sous”,”taratata”,”tien”,”toute”,”v’lan”,”veut”,”voudra”,”voudrons”,”voulez”,”voulus”,”aie”,”attendu”,”auraient”,”autant”,”avais”,”ayant”,”beaucoup”,”ç’a”,”cela”,”cette”,”chut”,”coucou”,”depuis”,”devant”,”devra”,”devrons”,”donc”,”dus”,”en”,”était”,”eu”,”eusses”,”évohé”,”fussent”,”ha”,”hors”,”jarnicoton”,”les”,”là ”,”mes”,”mon”,”notre”,”oh”,”ouais”,”parbleu”,”peu”,”pouah”,”pourrez”,”pouvant”,”psitt”,”puisses”,”qq.”,”quelqu’un”,”revoilà ”,”selon”,”serions”,”sinon”,”soyez”,”tayaut”,”tienne”,”toutes”,”va”,”veux”,”voudrai”,”voudront”,”vouliez”,”voulussent”,”aient”,”au”,”aurais”,”autre”,”avait”,”ayante”,”bernique”,”ç’aura”,”celle”,”ceux”,”ciao”,”couic”,”des”,”devante”,”devrai”,”devront”,”dont”,”dussent”,”encontre”,”étant”,”eue”,”eussiez”,”évoé”,”fusses”,”hein”,”hou”,”je”,”lesdites”,”ma”,”mien”,”morbleu”,”nôtre”,”ohé”,”ouf”,”parce”,”peuchère”,”pour”,”pourriez”,”pouvante”,”pst”,”puissiez”,”qqch.”,”quelqu’une”,”rien”,”sera”,”serons”,”soi”,”soyons”,”taïaut”,”tiennes”,”tu”,”vers”,”via”,”voudraient”,”voulaient”,”voulions”,”voulut”,”aies”,”aucun”,”aurait”,”autres”,”avant”,”ayantes”,”bien”,”ç’aurait”,”celles”,”chacun”,”clic”,”crac”,”desdites”,”devantes”,”devraient”,”dia”,”du”,”dut”,”endéans”,”étante”,”eues”,”eussions”,”fi”,”fussiez”,”hem”,”hourra”,”jusque”,”lesdits”,”made”,”mienne”,”motus”,”nôtres”,”olé”,”ouille”,”pardi”,”peut”,”pourquoi”,”pourrions”,”pouvantes”,”pu”,”puissions”,”qqn”,”quels”,”sa”,”serai”,”seront”,”soient”,”stop”,”te”,”tiens”,”tudieu”,”veuille”,”vivement”,”voudrais”,”voulais”,”vouloir”,”voulût”,”ait”,”aucune”,”auras”,”aux”,”avec”,”ayants”,”bigre”,”ç’avait”,”celui”,”chacune”,”clac”,”cric”,”desdits”,”devants”,”devrais”,”diantre”,”dudit”,”dès”,”entre”,”étantes”,”euh”,”eut”,”fichtre”,”fussions”,”hep”,”hue”,”la”,”lesquelles”,”mais”,”miennes”,”moyennant”,”nous”,”on”,”oust”,”pardieu”,”peuvent”,”pourra”,”pourrons”,”pouvants”,”pue”,”purent”,”quand”,”qui”,”sacristi”,”seraient”,”ses”,”sois”,”suis”,”tel”,”toi”,”turlututu”,”veuillent”,”vlan”,”voudrait”,”voulait”,”voulons”,”vous”,”al.”,”aucunes”,”aurez”,”auxdites”,”avez”,”ayez”,”bis”,”ça”,”cependant”,”chaque”,”comme”,”crénom”,”desquelles”,”devez”,”devrait”,”dois”,”due”,”dû”,”envers”,”étants”,”eurent”,”eux”,”fors”,”fut”,”heu”,”hum”,”ladite”,”lesquels”,”malgré”,”miens”,”na”,”nul”,”ont”,”ouste”,”parmi”,”peux”,”pourrai”,”pourront”,”pouvez”,”pues”,”pus”,”quant”,”quiconque”,”sans”,”serais”,”si”,”soit”,”sur”,”telle”,”ton”,”un”,”veuilles”,”voici”,”voudras”,”voulant”,”voulu”,”vu”);
Hi,
I’ve installed the plugin and for some reason the keywords are not showing up in the area where they should. I don’t know what I’m doing wrong. Can anyone help me?
Nevermind, I read one of the previous posts and removed the [0] from functions.php and it’s working great now!
Thanks for the plugin!
So, I’m having the most bizarre problem: The autometa plugin is placing the tags in the posts just fine, but Technorati isn’t indexing the tags for some reason. I’ve searched and not found anything, I’ve also submitted multiple trouble tickets with Technorati and no response, so I’m hoping someone can shed some light on things here. I use the default theme, completely unmodified minus the plugins I’m using. Pages validate as XHTML 1.0 transitional, and if I manually enter tag links in the body of my posts, they seem to get indexed by Technorati. However, there are two things I’m doing differently than the plugin, as far as I can tell, when I put the links in the body of the post: 1)I’m not using CSS to style them as hidden, and 2)I’m putting them in the body of the post, whereas the plugin puts them after the body of the post. I’m not sure if either of these things may be causing my problem, but I’m completely stumped. Can anyone suggest anything I need to look at, or read that might help me get this working? In case you’re not pulling it from above, the site is http://blog.theburrowfamily.net for anyone nice enough to look it up for me.
Thanks in advance!
Hi,
Autometa doesnt work on my WordPress 2.0 installation.
I activate the plugin and after saving post changes I see this a list of errors like this:
WordPress database error: [Can't find FULLTEXT index matching the column list]
SELECT MATCH(post_content, post_title) against (‘este’) as score FROM wp_posts where id=41;
any help?
smdani: the 1st thing to check is that autometa has been configured properly. if you go into the wordpress admin screen and open the AutoMeta tab (which is under the Plugins tab) does it tell you that AutoMeta is “ready for use”?
Where are the meta tags being written. I see it on the “write” page of wordpress and it is populated with fields but I do not see it when I look at the source code for the post after publishing. I have already created the index as well from wordpress.
any ideas?
After ugrading from wp 2.0 to 2.0.1 your plugin is failing. Same error as smdani. Is this a common problem?
Regards,
Hans
Hmm… it seems that with the new version of Autometa combined with WordPress 2.0.1, there are NO keywords in the source code of ANY of my posts, just two quotation marks side by side.
Well, I somehow managed to get autometa to start making tags, but now I have a new problem – the same problem the people above have been talking about. Autometa makes the tags fine and my entries get posted, but each time I make a post I’m brought to a screen that says this:
“Warning: uasort(): Invalid comparison function. in /hsphere/local/home/shortstu/vixenk.net/wp-content/plugins/autometa/autometa.php on line 73
Warning: Cannot modify header information – headers already sent by (output started at /hsphere/local/home/shortstu/vixenk.net/wp-content/plugins/autometa/autometa.php:73) in /hsphere/local/home/shortstu/vixenk.net/wp-admin/post.php on line 59″
2.0.1 failure duplicated here too.
Still looking at it.
The custom field does get added to the page.
And the admin page is there. I did have to add the full index.
When I do save and edit on an old post, the field is added, but the metadata is not updated.
If I manually update the field, the keywords are inserted.
So, it is definatly the generation that is broken.
I’ll see later what more I can find out….
This is fantabulous! Thanks for a great plug-in that works right out of the box.
Whats odd is that the plugin works fine if I’m posting via the write interface in the admin panel, but if I post via an XMLRPC client, it doesnt update the tags and also produces an error to the client. But the post still gets posted.. its strange.
Doesn’t seem to work with WP 2.0.1. When I post I get a lot of errors.
Hello, I have never used your plugin and it seems to be very powerfull and helpfull. I would like to test it. Unfortunately, I got a similar already described by Jonquil. The same error message and keywords added to my post (very strange). Any news about this potential bug.
My provider is “providing” WP 2.0.1, PHP 4.3.10, MySQL 4.1.15 under Linux.
Thx by advance for your answer.
I’m a smidge confused. (yes, a “smidge” – live with it. :p ) I do get automatically generated keywords (awesome, by the way!) but I don’t get the keywords showing up in the keyword meta tag in the html once all has been saved. Should I be adding some code to the “Single Post” (single.php) template? Or am I just not understanding how this thing works? I am assuming that it is supposed to add meta keywords into the html, right?
Thanks for the great plugin!!
On WP 2.0, Autometa plugin seems to create custom headers okay, but also produces the following error each time it does so:
“…uasort(): Invalid comparison function…”
This error seems to occur with every single post view.
I hope you find the time to look into this.
Otherwise thank you for a great plugin.
I am getting this error
Warning: uasort(): Invalid comparison function. in …./wp-content/plugins/autometa.php on line 73
Warning: Cannot modify header information – headers already sent by (output started at …./wp-content/plugins/autometa.php:73) in …./wp-admin/post.php on line 59
I’m having the same problem, running WP 1.52, where the plugin installed fine, I have the fulltext index installed and it’s reporting it’s installed fine.
The keyword tags are showing in the post, but no actual keywords are showing up in each individual post. Each post has keywords when I go to edit it, so they are there. They’re just not being displayed when the page is rendered.
Running the latest version of the plugin as well.
Hi Rich,
I just installed the autometa for my website. Everytime I initially save a post I get a number of error messages:
Warning: uasort(): Invalid comparison function. in /homepages/45/d153500400/htdocs/Blog/wp-content/plugins/autometa/autometa.php on line 73
Warning: Cannot modify header information – headers already sent by (output started at /homepages/45/d153500400/htdocs/Blog/wp-content/plugins/autometa/autometa.php:73) in /homepages/45/d153500400/htdocs/Blog/wp-admin/post.php on line 59
when I hit the “back” button and try again, there seems to be no problem.
I am fairly new to all of this so I was hoping you could tell me what the problem might be and how I might fix it.
Thanks.
FreakingGenius: your problem might be solved by or related to this codex article on “headers already sent” errors.
Anyone who’s seeing the “uasort bug” – I think i’ve fixed it. If you donwload the current version (0.5b) it should solve the problem.
Rich,
I checked both items (i.e. the Codex on “headers already sent” and downloaded 0.5b) and it seems to work fine now. Thanks a lot!
Thanks for the update FreakingGenius; glad it’s fixed the problem. If anyone with the uasort problem can confirm if it’s fixed that would be very helpful too.
Dear Rich,
I am running v0.5b in wordpess 2.0 and have added tags to an existing post and resaved the post but they don’t show up in the post. Viewing the page source for the Meta Tags shows no keywords:
I made a test post, saved it to generate tags and then published it but I see the same thign as aboe … no keywords anywhere in the page source.
I hope this information is helpful.
Best,
James
http://www.sns.ias.edu/~jns/
Thanks for the update James – I can indeed see some output in your blog, suggesting that the plugin is installed OK, so there’s some kind of operational issue here that we need to get to the bottom of. Before I start coming up with less likely possibilities, the first thing to check is that the Plugins>AutoMeta page shows that the plugin is correctly configured and ready to go.
Dear Rich,
I had the famous “uasort” problem. In last version 0.5b, the bug is fixed. Thank you very much!
It is the first time I am using your plugin and I am really impressed. Very good job!
Thanks to share with us your work.
Ustrici
Rich,
Hi. Yes it says the plugin is correctly configured and ready for use, the necessary indices have been created.
Best,
James
http://www.sns.ias.edu/~jns/
Rich,
I just found the tip about removing the [0] at the end of line 475 in wp-include/functions.php for wordpress 2.0 and it has fixed my problem.
Best,
James
http://www.sns.ias.edu/~jns/
Am I the only one having the problem where no keywords are published?
Looking at the source I have
foreach Post, it’s always empty. Can anyone give me a clue about what might be wrong?
You can check it out at http://www.ruicruz.com
Hi Rui, perhaps you’re seeing “the [o] bug” that’s in the current release of WordPress. The fix is very simple (see the linked comment from earlier). if this doesn’t solve your problem, let me know.
hum..
I’ve read the post but oddly enought I have another blog v2.0.1 and the Autometa fields don’t even show up when I’m editing a post. This problem is even worse. No one else is having this problem with version 2.0.1?
oops neverming, that was me panicking… it works great with version 2.0.1 I guess I’ll have to upgrade my other blog.
Thank you, this plug in is great.
Thanks for the swift update! (0.5b / ‘uasort’ fix) — I am running it now and checking for errors. From what I’ve read, it sounds like a done deal. Thanks again for a great plugin!
Looking through these comments, I was beginning to wonder if I was the only person having the “headers already sent” issue under 2.0.1 (and therefore wondering if I had a horked WP installation)….however I’m apparently not alone. You might want to see this post over on the WP support site for an additional description of the problem.
In my case — any post that I make under WP2.0.1 which contains quotes generates a set of errors. E.g.,
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''today\') as score FROM wp_posts where id=493' at line 1]
SELECT MATCH(post_content, post_title) against (‘today\’) as score FROM wp_posts where id=493;
Warning: Cannot modify header information – headers already sent by (output started at [blah]/wp-includes/wp-db.php:102) in [blah]/wp-admin/post.php on line 59
Mike, thanks for pointing me at that; and for the debug info. Update follows when I twig what’s up.
I’ve just uploaded AutoMeta version 0.6, which sports a number of changes. First and foremost is a bugfix for the problem Mike just described.
To upgrade, delete your old autometa.php file and upload the new autometa directory to your plugins folder.
If you want it to “just work” then so long as the new plugin is enabled then that’s exactly what it should do.
The other changes in this release are the inclusion of the French stop-word set in the distribution (though you still have to manually configure which language to use; suggestions on how to code this so it’s automatic would be appreciated).
I’ve also had requests to make the Technorati Tags visible, and I’ve made a first pass at the necessary internal changes that make this possible. You can now opt to switch off the automatic insertion of hidden technorati tags, and directly call the method from within your theme as follows:
<?php technorati_tag(false, ", "); ?>this should include a non-hidden, comma separated, list of tags wherever it’s used.Feedback in the little box below would be appreciated as always!
Thanks! That seems to have done the trick.
Hello again, I posted back on page 9 of your comments about this problem I’m having. I’m have actual code to add to this: