Codesnipp.it Social Code Sharing

Amber Weinberg

Need Help Querying Multiple IDs

by Amber Weinberg on Sep 25, 2011

Can't get this to work: <?php query_posts( array( 'post_type' => 'portfolio', 'post__in' => array( get_post_meta($post->ID, 'Same Client', true)) ) ); if ( have_posts() ) while ( have_posts() ) : the_post(); ?> The value of Same client are the IDs 103,40...when I manually put the IDs in like this: <?php query_posts( array( 'post_type' => 'portfolio', 'post__in' => array(103,40) ) ); if ( have_posts() ) while ( have_posts() ) : the_post(); ?> it works...any ideas why get_post_meta isn't working here?

Can't see the comments? Please login first :)