i am not sure that this is place you should change the shortcode
This code retrieves several values and not one..
as i understand it you are looking to get one value back right ?
that's much simpler and doesen't require the use of "foreach"
you simply put this in the desired location
<?php echo get_post_meta($post->ID, 'restaurants', true); ?>
To get a custom field value inside the loop:
echo get_post_meta($post->ID, $key, true);
to get a custom field value outside the loop:
$postid = $wp_query->post->ID;
echo get_post_meta($postid, $key, true);
- in both case the key is the custom field name...