我正忙于为其中一个客户构建小型主题选项页面,并且需要一些帮助解决问题。Wordpress主题选项页面query_posts
目前我有手动将在IDS WordPress网页的选项与基于主题的选择是query_posts
提取数据,创建一个名为$euro_box_1_vehicles;
可变我的选择填充为32,39,43,54
中输入,当我用echo打印这个语句时,我得到了相同的结果。
当我用array($euro_box_1_vehicles)
替换array(32,39,43,45)
时,它只返回一个结果。
<?php
$vehicle1 = array(
'post__in' => array(32,39,43,45),
'post_type' => 'page',
);
query_posts($vehicle1);
while (have_posts()) : the_post();
?>
尝试`var_dump($ euro_box_1_vehicles)`并让我们知道打印内容。 – TheDeadMedic 2010-11-24 14:48:56
当我回显var_dump = string(11)“32,39,43,45” – ApPeL 2010-11-24 15:56:11