Is this possible? If so, can someone point me towards a clear tutorial? I have a column of content I want to float right of the_content, so I'd like to be able to use a shortcode to put that content in the post for a page.
I've found the following (but want to modify it for get_post_meta):
function get_custom_field_fn() {
global $post;
$custom_field_value = get_post_meta($post->ID, 'cf_name', true);
return $custom_field_value;
}
add_shortcode('cf_name', 'get_custom_field_fn');
I'm guessing that I need to change a few things but not sure which things to change. My custom meta boxes will have 8 fields. I'm also guessing that my shortcode will need to allow for the post/page ID and I also need to interject some HTML in the function.