One of the plugins I use for this blog is Jerome’s Keywords, which I’d highly recommend, as it’s an excellent tagging solution. One problem I have had with it though, is that it currently doesn’t always include the keywords in the RSS feed (it does for some people, and it doesn’t for others, so it could just be a bad combination of plugins or something). Anyway, I implemented this simple hack in jeromes-keywords.php:

function the_keytags_rss() {
	$keywords = '';
	$post_keywords = get_post_custom_values(KEYWORDS_META);
	if (is_array($post_keywords)) {
		foreach($post_keywords as $post_keys) {
			if (!empty($post_keys))
				$keywords .= ',';
			$keywords .= $post_keys;
		}
	}
	$keywordlist = explode(',', $keywords);
	foreach ($keywordlist as $singlekeyword) {
		if (!preg_match("/^(\s|)*$/", $singlekeyword)) {
			echo '<category>' . $singlekeyword . '</category>';
		}
	}
}

Then all I had to do was add <?php the_keytags_rss() ?> to wp-rss2.php immediately after <?php the_category_rss() ?>, and now I have the keywords showing up in
<category> tags, which is what Technorati uses to index tags from WordPress blogs.


No Responses to “Jerome’s Keywords Technorati tags workaround”  

  1. No Comments

Leave a Reply