Spam in a Can

WP plugin of the day: Belongs to Cat - I haven’t tried it, but it looks handy.

I’ve added a WordPress custom field for entry freshness, which so far I’ve used only on the canned entries. Custom fields are easy to add on the editing page, but getting them to display is another matter. The documentation is obscure as usual. What you have to do is put a the_meta() command into your template (index.php), and then style ul.post-meta, .post-meta li, and, optionally, span.post-meta-key.

What I did was add <?php the_meta(); ?> to the end of my feedback div in index.php, right after the line with the comments_popup_link command. To style the meta output, I added the following to my stylesheet:

ul.post-meta {
	display: inline;
	margin: 0;
	padding: 0;
	list-style: none;}
.post-meta li {display: inline;}
.post-meta li:before {content: ' | ';}

So now instead of saying this entry was spam in a can, I can do it automatically and the meta data will appear at the end of the post. (Wait for it…)

Comments are closed.