Query Posts with custom posts type and post__in
-
Hi,
I try to generate a query :
<?php query_posts(array( ‘post_type’ => array( ‘developer-editor’ ), ‘orderby’ => ‘title’, ‘order’ => ‘ASC’, ‘post__in’ => array($developer_id) ) ); ?><?php if (have_posts()) : while (have_posts()) : the_post(); ?>
…Where $developer_id=’9313,9349′
So, I should see two posts but only first ID is present. But, if I change $developer_id directly by 9313,9349. That’s work ! But I can’t do that in reality. I need to use $developer_id.
I did an echo on $developer_id to check if it works. It’s ok, I have my two ID : 9313,9349. So, I don’t understand where is my mistake. A bad interpretation of the comma ?
The topic ‘Query Posts with custom posts type and post__in’ is closed to new replies.