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
The only thing I worry about is the fact that the tags are hidden. Will that be bad for SEO? Will Google think we are spamming? Hummm
Meta Tags are always hidden, and Technorati Tags are just links to Technorati for the benefit of Technorati, so they still get found correctly.
I agree though, that it would be nice if the taglist could be made visible, so I’ll add that to the list of feature requests.
Why “boakes” gets added as a keyword?
Good catch thanks. That’s a hangover from the fact that I’ve been using it on this site for several months, so in cases where I hadn’t set a keyword at all I still wanted some content because it was on this site. You can safely remove it for now, or download the latest release in which it is removed.
Once there is an admin interface this’ll be something to add back in so it can be configured and used, but for now, if anyone wants to do similar, just uncomment lines 151 to 153 and change $keywords to whatever you want the default to be.
Thanks!
As you suggest, multiple keyword meta tags validate, so it falls to the interpreter of the document (GooleBot, MSNBot, etc.) to decide how to handle them. Anything that I (or just about anyone else) can suggest to describe how multiple entries are processed would be pure speculation since only those with access to the source of the major search engines can tell you exactly how data is processed.
So on to the bit I can answer… I have considered writing a “convert old documents” utility – it would actually be quite simple to do, but there are two hurdles. Firstly there’s no admin interface, yet, and it should really be a one-time button that exists there.
The second (and main) reason for it not existing is that I don’t want Technorati to be suddenly deluged with machine generated tags.
Having the machine generate tags, and then hand-finishing them is okay, but if the tags are just machine generated then that could reduce the overall effectiveness of Technorati to being no better than Google BlogSearch (i.e. a machine driven search engine). The unique selling point of Technorati is the human authored semantic markup – this plugin assists that, but doesn’t seek to replace it.
Having said that, you can add tags to old posts – just edit, and save the post, and the autometa plugin will spot that there are no tags, and add them for you, leaving you free to improve them by hand.
Thanks Rich,
Cool Plugin.
Graeme Sprigge – icooltools.com
Thank you very much for you answer
Hey, the autometa doesnt find and generate keywords on my website. Could u have a look ?
Hi Jakob, there’s a signature in the plugin (which says the name and version of the plugin) that gets printed to every page to assist with remote debugging such as this. That signature is missing, so my guess is that you’ve maybe installed the plugin, but not enabled it.
I seem to be having the same problem Jakob has (or at least, similar symptoms)… autometa doesn’t seem to want to do its thing for me. It’s definitely enabled, as an autometa custom field is being generated on my write post page, but it’s empty. When using v 0.2, it did put “boakes” in, but that was it. Posts for which I have attempted to auto-generate keywords just have <meta name=”keywords” content=”" /> in their head
Looking at the source of slakethirst I can see the Autometa signature, but it’s not there on Jakob’s site, so they’re two separate issues I think.
C, your problem may just be that the autometa tag was generated before you added your text, if that’s not the case (RSVP!) then I have an idea of what the problem might be so a fix won’t take long.
Hey, Rich. I don’t believe that’s the case… I’ve tried deleting the custom field and re-saving the post(s) countless times, but nothing happens other than that a new, empty autometa field is created. Looking forward to hearing your ideas/fixes.
It’s time to break out the theory of what might be missing, and my guess is that it’s the full text index.
My first suggestion is that this SQL will fix the problem:
ALTER TABLE wp_posts ADD FULLTEXT post_related ( post_name , post_content )I’ll wrap this into the next version, but if it can be proven that it fixes the problem before that release then so much the better.
Hiya Rich,
I’m having the same exact problem as C, except I’m a little wary on how to fix this SQL thing. How do I execute that code?
I’m not very good with this back end kinda stuff, I’m more of a make-things-pretty designer girl.
Hi Lara, if you’re not comfy with technical gubbins, then hold fast until the next release which will include the code so you don’t have to do anything.
Great thanks, do you know when the next release is due to be out?
I can’t seem to get the auto generation part to work. I have plenty of content but it doesn’t seem to create any tags of it’s own.
Thanks for the feedback everyone. I’ve created a 0.4 release (though I’ve not linked to it as the the main downloadable yet).
This version which includes an admin page under the Plug-ins tab. Once you install and activate this version, go to the admin page and click on the “Add the index” button. If all goes well it will tell you that the update was successful, and hanceforth automatic keyword suggestions should be generated.
It appears to work on my test blog but if someone who’s experienced the problem could have a go with it and confirm if this solves things for them, then that would be great. If/when I get confirmation of it working then I’ll link to it from the article.
Using 0.4 on 2.0 RC1 I get the following error:
I have the same error on all of my blogs.
I must be missing something. I’ve created a new post, saved it, and then published it. However, the following is all that I’m seeing when I vew the source:
I’ve also tried editing and saving existing posts with the same result.
After a little head scratching, hopefully 0.4a will solve any remaining problems for WordPress 1.5.
Download version 0.4a.Andy, I’m asking around for WordPress 2.0 information because I can see there is a change in the post_meta_data method which appears to be causing your problem.
Latest version works great for me!!
TwisterMc, great to hear thanks.
I’ve just released 0.4b which fixes a (stoopid) typo’ in 0.4a). I’ve tested 0.4b successfully on a vanilla blog so the people that have had problems should be able to use the plugin successfully now – fingers crossed & let me know if there are still any problems!
Download version 0.4a.
The plugin is adding tags now on the latest build of WP, but it still displays the error.
I do this, but when I view the source on my post the meta tag is nowhere to be seen.
What would be the best way to go back through 150 posts and add the tags?
Hi Ryan, looking at the site I can see the meta tag constuct correctly on every article, so it’s definitely installed and working. Also, I can see two of the articles have tag content, which looks like it’s generated by the plugin. So can you clarify what “nowhere to be seen” means (i.e. do you mean that the meta keyword tag “content” field is empty)?
As for going through “previous” posts, if anyone would like to submit a patch for a convenience interface then that would be useful. In the mean time I recommend using a tabbed browser such as Firefox – once you’re in the “Manage | Posts” section you can use the middle mouse button to edit multiple posts at once. This can significantly speed the process of tagging your existing articles.
Thanks for the prompt reply. Sorry, I managed to fix what I did shortly after posting that. It looks to be working now. I went through a few old posts but find it to be pretty daunting task. I’m content just having different meta tags to make sure google doesn’t think I have dup content. How does the Technorati part of this work exactly?
So, I’ve installed the plugin and enabled it, and a first glance it seemed to work correctly, except now that I’m looking at it, I’m seeing really weird things. There’s only output from the plugin in two places:
1)The meta keywords for the first post on the index page show up before the first post, as I would expect, but they only show up for that post, no subsequent posts show any autometa output for the meta keywords.
2)The technorati tags for the last post on the index page show up after the last post, at the very end of the code, but they only show up for that post, no subsequent posts show any autometa output for the technorati tags.
I use a modified index.php for the default them so that I can have a collapsible comments section on the post on the index page, so that might be causing the problems, or I could just be misunderstanding how it is intended to work. Should all of the posts displayed on the index have both keywords and technorati tages?
The good news- installed it and it worked quite nicely. Easy install, simple use, I like it.
The bad news- Since the Jagger update hidden text using css is a huge no-no, and when I looked in source and saw how that was handled . . . ooh no. Deactivated.
Any way you can get rid of that? Any way we can put the tech tags in the template where we want them AND visible? Oh, and why just a keyword meta, where’s the description meta?
I was working fine with WP 2.0 RC2, until I installed the 12/14 nightly build. Now I’m getting the “Warning: Invalid argument supplied for foreach() in MyURL/wp-content/plugins/autometa.php on line 169″.
I tried using 0.4b, no luck, and no tags. Any help would be appreciated.
And Kickass, you might want to try something like Ultimate Tag Warrior if you want your tags to display. Me, I didn’t want to clutter my posts up with a geeky tag cloud or a line of tags (but wanted Technorati to have something to eat), so I loved the fact that Autometa did invisible tags, and really didn’t care if Google lowered my PR, since it was non-existant anyway.
David, the plugin is behaving as I’d expect it to, you’ve identified something that needs improving. The way I use WP is that the index page is JUST an index, and you have to click on the story to read it. Other people use the index page to display several stories. The plugin was designed for the second kind of usage.
Kickass, the technorati tags are not intended for Google, they are intended for Technorati, that’s why they’re hidden. A future version could include a set of tick boxes in the admin page which woudl add technorati tags to the sidebar or add a function that woudl output them on demand. I’m too short on time to do this right now, but patches are always gratefully received.
Croak, there’s no reason for Google to lower your PR because you have hidden links. What they almost certainly will do is not increase the rating of the page you’re linking to.
Rich,
Any idea what changed in WP’s 2.0 RC2 nightly build that’s causing my error listed above?
“Warning: Invalid argument supplied for foreach() in MyURL/wp-content/plugins/autometa.php on line 169″.
Does this plugin also works with version 2.0 of wordpress?
I upgraded but received an error while opening my website
I’ve not installed it on a 2.0 version yet. Once I do I’ll know the answer to any 2.0 issues. In the mean time if anyone has success or works out any necessary tweaks, please feel free to paste a patch here and I’ll incorporate it.
So perhaps I’m misundeerstanding, but you state:
“The way I use WP is that the index page is JUST an index, and you have to click on the story to read it. Other people use the index page to display several stories. The plugin was designed for the second kind of usage.”
So, the plugin was designed for the people who use the index page to display several stories? If that’s the case, it doesn’t seem to be working as it should, as it only adds meta keywords for the first story, and technorati tags for the last story, and nothing in between. If it were designed to work on index pages that display a few stories, I would expect the meta keywords and technorati tags to be inserted for every story displayed on the index page.
Did you mean that it was intended to function with blogs that use the index page as you do, only as an index and not to display stories? If it was only intended to work on individual post pages, it’s behaving as I would expect it to. (Though Technorati still isn’t indexing my site according to those tags… I’m still trying to figure that out…)
Forgive me, but I’m a novice — and I don’t get it. I have added the Autometa plugin to my blog. It appears as a custom field on my “Write Post” screen. So I have it — and I guess it is working. However:
(1) Is it completely automatic on every post? Will Autometa do its thing — without me asking it to do something on each post?
(2) When I first start writing a new post, the Autometa field is NOT opened up on the screen. However, after my first save, it appears. So that tells me it is working. However, there are no keywords in the “values” box. Shouldn’t there be? Isn’t that the idea — that it creates them automatically?
(3) I don’t understand what this paragraph of yours means:
“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.’
No, I DON’T have any words, even after the first save. But does this say what it sounds like it says — that after the first sve, no new keywords are added automatically. In other words, is the best way to make Autometa work to add keywords into the “Values” box manually?
And I sure don’t understand what you mean about hitting the delete button. When I do that, I do NOT get a fresh set of keywords — I’m still getting no keywords at all. So far, the only way I have gotten any keywords into that Values box is to add them myself.
What am I not getting? Thanks very much for your help.
Terry Hull
Warning: Invalid argument supplied for foreach() in /homepages/16/d141775704/htdocs/warbly/wp-content/plugins/autometa.php on line 169
getting this error since WP 2.0 upgrade.
any ideas how to get it working again?
Since I updated to WordPress 2.0, whenever the Autometa plugin is activated this line appears at the top of my site’s index page:
“Warning: Invalid argument supplied for foreach() in /hsphere/local/home/shortstu/burnstyle.net/surreality/wp-content/plugins/autometa/autometa.php on line 169″
I tried uninstalling and reinstalling the Autometa plugin, however this line continues to appear at the top of the page whenever the plugin is enabled. I’m using the newest version (0.4b).
Could someone help me get this fixed?
I installed WP 2 and am now getting the foreach error because of AutoMeta as well.
Hopefully there will be an update.
I’m flying bling here (because I’m not on 2.0 yet) so this will be a stepwise process. I think the “Invalid argument” errors are caused by the
get_post_metamethod which no longer returns an empty array. I’ve added two fixes for this at lines 145 and 169, and assembled a 0.5a release. If it fixes the problem please let me know, and likewise, if it doesn’t, or if there are other errors once this one is hurdled, leave me the details and I’ll see what I can come up with (feel free to submit your own patches too if you find solutions).The official release is still 0.4b until I know this one works. Download 0.5a here.
0.5a cured the error display, but the keywords aren’t making it into the page source. All looks well on the admin side, keywords show in auto meta field, but not in page source on display page.
Bless you and your children and your children’s children.
Great plugin.
thank you so much for this plug in! this will really help a bundle!
Sorry my English.
Error:
Warning: Invalid argument supplied for foreach() in /home/goofree/public_html/wp-content/plugins/autometa.php on line
169
Thanks
Hi Rich
Loving your plugin… but can’t get it to work yet.
Got the “invalid argument for foreach..” problem on the 04.b on the wp2.0.
Problem disapeared again after installing 0.5a, but after editing a post I didn’t get any meta.
I hope you decide to upgrade your wp to 2.0… then I bet we would get a solution that works pretty soon
Crossing my fingers here..
/miko67
It doesn’t seems to work with wordpress 2.0
I ma getting the following error, quite suddenly I might add. It was working then this:
Warning: Invalid argument supplied for foreach() in /home/particle/public_html/wp-content/plugins/autometa.php on line 169
I am running WordPress 2.0
Any ideas?
Wow – LOADS of WP 2.0 interest! As you’ll see here, I’m upgrading to 2.0 tonight, so compatibility updates will follow.
The Good News: I’ve now upgraded to WordPress 2.0 and I’m happy to report that AutoMeta version 0.5a is working perfectly with it!
The Bad News: WordPress 2.0 has a bug which is what’s been affecting everyone
The Fix: If you can’t wait for 2.0.1, the fix is VERY simple – you just need to remove “[0]” from line 475 of
wp-includes/functions.php.Hi Rich
You are amazing – one little [0] gone and everything seems to work. At least I’m getting some keywords now.
One problem though:
(We are on WP2.0 with autometa version 0.5a and removed [0] from line 475 in wp-incudes/functions.php)
I only get 7 (seven) keywords out of a lengthy article that ought to provide me with a lot more keywords.
I changed the autometa.php in the plugin editor like this:
$autometa_threshold=1;
…
$autometa_maxWords=20;
end edited 5 (five) posts.
Still just 7 keywords…
What seems to be the problem?
I have analyzed each article and have more than one keyword in each article that is used more than the 7 (seven) but still they don’t get counted.
It’s like the plugin only reads to a certain length…