Ever thought about using a custom field to dynamically generate meta tag information for your WordPress blog? Took me a couple of hours of googling and experimenting before I figured out how to do it, so I figured I’d post the solution.

My first guess was this:

And I was wrong. Turns out you need to use get_the_id() instead of $post->ID.