I have a custom field in my post called fb_name. I need to be able to get that field name outside of the loop in my sidebar. How can I accomplish this?
2 Answers
If it's a single post or page, you can just pass the global $post->ID:
echo get_post_meta($post->ID, 'fb_name', true);