我有这个问题要回复帖子
$sitens = new wp_query( array ( \'post_type\' => \'post\' , \'post__in\' => array($post_id) ) );
if ( $sitens->have_posts() ) : while ( $sitens->have_posts() ) : $sitens->the_post();
$message .= \'<tr width="50%" style="float:right;width:50%;text-align:center;margin-top:30px;border-bottom: 1px solid #eee;padding-bottom: 20px;">
<td style="text-align: center;margin-right: auto;display: block;margin-left: auto;">
<div style="margin-bottom:15px;margin-top: 15px;direction:rtl;text-decoration: none;height: 50px;">
<a href="\'.get_permalink($sitens->post->ID).\'" target="_blank" style="text-decoration: none;">
<span class="post_title_" style="font:bold 20px Arial,Helvetica,sans-serif !important; color:#359bcf">\'.get_the_title( $sitens->post->ID ).\'</span>
</a>
</div>
<a href="\'.get_permalink($sitens->post->ID).\'" target="_blank" style="text-decoration: none;">
\'.get_the_post_thumbnail($sitens->post->ID, \'home-grid\').\'
</a>
</td>
</tr>\';
endwhile; endif;
但错误在于
$post_id
有3个id像
(\'444\',\'3\',\'22\')
, 它必须给我回3个帖子,但它给我回1个帖子
为什么?