2012-06-25 37 views
0

我试图过滤我的主页循环到1的职位类别ID为34我有多个自定义职位类型与自定义分类标识34分配给他们。我想不通这是为什么不工作:通过Wordpress类别ID筛选不工作

<?php query_posts('showposts=1&cat=34'); ?> 
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> 

回答

0

这不是tag

<?php query_posts('showposts=1&cat=34'); ?> 
+0

我更新,它仍然“很抱歉,但所请求的资源没有在此网站上发现“。 – Sam

+0

[检查出来](http://codex.wordpress.org/Function_Reference/query_posts)。 –

0
<?php query_posts(array('post_type' => 'customposttypename','category' => 'catslugname', 'posts_per_page' => 1)); ?>