我有一个名为“audio”的自定义帖子类型。要显示页面中的所有帖子,我写了下面的代码,但它不起作用。显示页面中的自定义帖子类型帖子
<?php
$post_type = "audioes";//post type names
echo "djnbfj";
$post_type->the_post();
// The Query
$the_query = new WP_Query(array(
'post_type' => $post_type,
'orderby' => 'post_date',
'order' => 'DESC',
'showposts' => 1,
));
// The Loop
?>
<?php
while ($the_query->have_posts()) : $the_query->the_post(); ?>
<div class="issue-content">
<?php get_template_part('includes/breadcrumbs', 'page'); ?>
<?php if (has_post_thumbnail()) { the_post_thumbnail();}
get_template_part('loop-audio', 'page');
?>
</div><!--issue-content-->
<?php endwhile; ?>
</div> <!-- end #left_area -->
我如何获得帖子类型我想要上面写的自定义的。
我的文章类型“audioes”。 – Ranjit