-1
我想限制自己的帖子類型,但它顯示所有帖子。我想從#1posts_per_page對我的自定義帖子類型不起作用
這裏限制由3的帖子中,我已經嘗試了所有可能的解決方案是代碼:
<?php global $post;
wp_reset_query();
$args = array(
'posts_per_page' => 3,
'post_type' => 'services',
'orderby' => 'date',
'order' => 'DESC',
'update_post_term_cache' => false,
'update_post_meta_cache' => false,
'nopaging' => true,
);
$the_query = new WP_Query($args); ?>
我在這裏缺少什麼?
任何建議將不勝感激!
刪除''nopaging'',如果傳遞TRUE;然後顯示所有帖子閱讀部分'Pagination Parameters'。默認值是'false',使用分頁。 –