我需要得到与具体职位元帖子。如果我使用以下代码检查常规回路:
$args = array(
\'post_status\' => \'published\',
\'posts_per_page\' => 77,
\'post_type\' => \'post\',
);
$query = new WP_Query($args);
while ($query->have_posts()) : $query->the_post();
$literature = get_post_meta(get_the_ID(), \'popis_literature\');
var_dump($literature);
endwhile;
对于某些帖子var_dump
提供如下数据数组array (size=1)
0 =>
array (size=2)
0 => string \'32985\' (length=5)
1 => string \'59956\' (length=5)
如何通过这些ID之一查询帖子?这没有给我任何东西$args = array(
\'post_status\' => \'published\',
\'posts_per_page\' => -1,
\'post_type\' => \'post\',
\'meta_query\' => array(
array(
\'key\' => \'popis_literature\',
\'value\' => array(\'32985\'),
\'compare\' => \'IN\'
)
),
);