【发布时间】:2020-01-06 19:12:17
【问题描述】:
我在functions.php 中创建了自定义帖子,一切正常,但我的循环仅显示9 个帖子。我能做些什么来展示所有这些? 我使用的循环:
<?php
$custompost_loop = new WP_Query($custompost);
if ($custompost_loop->have_posts()) : ?>
<?php while ($custompost_loop->have_posts()) : $custompost_loop->the_post();
?>
<div class="offer__single">
<h4 class="offer__title">
<?php echo get_the_title(); ?>
</h4>
</div>
<?php
endwhile;
?>
<?php endif;
wp_reset_postdata(); ?>
【问题讨论】:
标签: php wordpress function loops