I’ve under code on my web page
$speakersselected = get_post_meta($post->ID, 'speakersselected', true);
print_r($speakersselected); //getting output (587,585)
$s_post = array(
'showposts' => 80,
'post_type' => 'speaker',
'post_status' => 'publish',
'post__in' =>$speakersselected,
//'post__in' =>array($speakersselected),
//'post__in' => array(587,585),
);
echo"<pre>";
print_r($s_post);
Output
if I exploit 'post__in' =>$speakersselected
then I get under output
Array
(
[showposts] => 80
[post_type] => speaker
[post_status] => publish
[post__in] => 587,585
)
if i exploit 'post__in' =>array($speakersselected)
then getting under output
Array
(
[showposts] => 80
[post_type] => speaker
[post_status] => publish
[post__in] => Array
(
[0] => 587,585
)
)
Each the output not working for me
if i add the static information 'post__in' => array(587,585)
then it is working for me
Array
(
[showposts] => 80
[post_type] => speaker
[post_status] => publish
[post__in] => Array
(
[0] => 587
[1] => 585
)
)
Any thought how one can ship dynamic information in post__in?