这是我目前在开发网站上拥有的代码。它只显示自定义帖子类型“pacificheritage”的10个结果,但它应该总共显示23个结果。
<?php
global $post;
$i=1;
$args = array(
\'order\' => \'ASC\',
\'orderby\' => \'post_date\',
\'post_status\' => \'publish\',
\'post_type\' => \'pacificheritage\'
);
?>
<?php if (have_posts()):?>
<?php
$list_of_posts = new WP_Query($args);
while ($list_of_posts->have_posts()):$list_of_posts->the_post();
$meta = get_post_meta( get_the_ID(), \'\');
?>
<?php echo $post->ID; ?>
<?php the_title(); ?><br/>
<?php
endwhile;
wp_reset_query();
endif;
?>