これを確認するために時間を割いていただきありがとうございます。
私はこれに数日を費やしました。wp.org で多くの時間を過ごしましたが、私はそれを理解していません。きっと簡単に修正できるはずです。何を試しても、ページごとの投稿数を制限したり、ページネーションを表示したりすることはできません。これは私の最近の試みです (私の最善の試みではないかもしれません)。このページには、すべての投稿または最近の投稿または何か (私のサイトではない) が表示されます。少なくとも投稿を制限するページを取得できたら、ページネーションに取り組みます。また、WP ダッシュボードでページごとの投稿を設定しても何もしません...そして決してしませんでした。そのため、自分で何かをコーディングしようとしています。ページごとの投稿数を制限できないのはなぜですか? ページネーションを現在持っている場所に配置しますか? これは完全な混乱ですか、笑?
再度、感謝します、
Dave (以下のコード)
<?php /* Template Name: Stories */ ?>
<?php
get_header(); ?>
<!-- *************************************** -->
<div class="custom_two_third">
<?php
// The Query
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array('posts_per_page' => 3, 'paged' => $paged );
$the_query = new WP_Query($args);
// The Loop
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
get_template_part( 'template-parts/content', get_post_format() );
}
// pagination
next_posts_link();
previous_posts_link();
} else {
get_template_part( 'template-parts/content', 'none' );
}
/* Restore original Post Data */
wp_reset_postdata();
?>
<div class="clear"></div>
</div><!-- custom_two_third -->
<?php
get_sidebar();
get_footer();
?>