Hey Guys, I'm using a meta box to store a bunch of page ID's. When I try to pass the page ID's to the post__in parameter of WP_Query it doesn't work becuase the metabox comes throug as a string, when it needs to be a comma separated integers.
So, say the "relatedpages" meta box contains: 55, 33, 22
$relatedpages = get_post_meta($post->ID, 'relatedpages', true);
$args = array(
'post_type' => 'page',
'posts_per_page' => -1,
'order' => 'ASC',
'orderby' => 'menu_order',
'post__in' => array($relatedpages)
);
$myposts = get_posts($args);
echo $myposts;
The problem is that $related pages is now "55, 33, 22" rather than 55, 33, 22
How can I overcome this? Is there a way to store just the integers in the meta box, rather than converting them to a string?
Thanks, Drew
