ブログのトップページに記事一覧を表示させるコードをfront-page.phpに入力して、以下のように作成致しました。
<div class="panel-content">
<div class="wrap">
<h2 class="entry-title">ゲーム攻略の新着ブログ</h2>
<ul class="recent-entry-list">
<?php
$args = array( 'post_type' => 'post', 'category_name' => 'game', 'posts_per_page' => 5 );
$my_query = new WP_Query( $args );
while ( $my_query->have_posts() ) : $my_query->the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'thumbnail' ); ?><span class="recent-entry-date"><?php the_time( 'Y.m.d' ); ?></span><span class="recent-entry-title"><?php the_title(); ?></span></a>
</li>
<?php endwhile;
wp_reset_postdata(); ?>
</ul>
</div>
</div>
このコードにページ機能を付けて、6件目以降を表示させたく思っています。
どなたかアドバイスいただけますと幸いです。
コメント(3件)
6件目以降を(ありったけ最後まで)表示させると、トップページが重くなるのでふつうはやらないと思います。
ページ機能にするとなると、トップのレイアウトが崩れてがめっちゃみづらくなることないですかね。
別ページでメニュー表を作る事に致しました。
Wordpress使い始めて1週間程度なので、分からない事だらけの為、質問の仕方も悪かったかもしれません。
ありがとうございました。