Sometimes I want to access one particular CPT to extract something from it, for example a custom field value:
$group = new WP_Query( array(
'post_type' => 'group',
'p' => $group_id
) );
while ( $group->have_posts() ) : $group->the_post();
$group_type = get_post_meta($post->ID, "group_type", $single = true);
endwhile;
However the purpose of a loop is to access more than one element so I dislike using a loop for a single post. Is there a way to do exactly the same thing (accessing this custom field value) without using a loop?