i found a code searching through stackexchange --> to create a "list" inside a meta box of a custom type, BUT, i don't see anything appearing in this meta box, except the input field (which comes from the example page from the CODEX : http://codex.wordpress.org/Function_Reference/add_meta_box), is it a problem with WP_QUERY inside a function?
Can you please tell me what is the magic trick to fix this? in my callback function, i added this code :
function myplugin_inner_custom_box() {
// Use nonce for verification
wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );
// The actual fields for data entry
echo '<label for="myplugin_new_field">';
_e("Description for this field", 'myplugin_textdomain' );
echo '</label> ';
echo '<input type="text" id="myplugin_new_field" name="myplugin_new_field"/>';
$s_query = new WP_Query( array(
'suppress_filters' => false,
'post_type' => 'movies'));
while($s_query->have_posts()):$s_query->the_post();
$sname = $post->post_title;
$s_output2 ='';
$s_output2 .= '<option value="'.$post->ID.'" >';
$s_output2 .= $post->post_title;
$s_output2 .= '</option>';
echo $s_output2;
endwhile ;
wp_reset_query();
}
But as i said, the "list" doesn't appear. Could you please help me?