Make a select list of a custom post type in a meta box

very simeler to the question here Display list of tags as drop down menu or radio buttons in a meta box?

but instead of list of tags you need to query the post list of your travellers post type
something like this:

$travelers = new WP_Query();
$travelers ->query('post_type=travelers&postprepage=-1');
while ($travelers->have_posts()) : 
   $recentPosts->the_post();
   $travellersnames[] = $post->title;
endwhile

and show the $travellersnames as your option for a select filed or multi select filed in your meta box

Leave a Comment