global $post;$args = array('post_type' =>'post-type');$meta = get_post_meta($post->ID, 'meta-box-slug', true); wp_reset_query();
global $post;$args = array('post_type' => 'post-type');$obituary_query = new WP_Query($args);while ($obituary_query->have_posts()) : $obituary_query->the_post();$meta = get_post_meta($post->ID, 'meta-box-slug', true); echo $meta;endwhile;wp_reset_query();
I've tried using this but I get nothing
And I've tried this too
That does displays the data but it throws a "Headers already sent error"
I'm not sure what I'm doing wrong. I haven't had much luck working with custom meta boxes.
Thanks in advance.