採用サイト制作に最適なWordPressテーマ「ISSUE」の機能概要

ワードプレステーマ別

TCDテーマAMORE:トップページ第4ブロックに表示される記事一覧の数を調整する

Q.第4ブロックの記事一覧表示数を変更したい

トップページ第4ブロックの記事一覧はデフォルトでは6件の表示になっていますが、表示数を調整する方法を教えてください。

A.下記のphpファイルの該当箇所を編集します

編集するファイル:page-welcome.php
編集する箇所:

         <?php if($options['fourth_cate']): ?>
            <?php
             $cat_id = $options['fourth_cate'];
             $the_query = new
WP_Query("post_type=post&posts_per_page=6&orderby=date&order=DESC&cat=".$cat_id);
            ?>
          <?php else: ?>
            <?php $the_query = new
WP_Query("post_type=post&posts_per_page=6&orderby=date&order=DESC");
?>
          <?php endif; ?>

      ↓

         <?php if($options['fourth_cate']): ?>
            <?php
             $cat_id = $options['fourth_cate'];
             $the_query = new
WP_Query("post_type=post&posts_per_page=●&orderby=date&order=DESC&cat=".$cat_id);
            ?>
          <?php else: ?>
            <?php $the_query = new
WP_Query("post_type=post&posts_per_page=●&orderby=date&order=DESC");
?>
          <?php endif; ?>

※「posts_per_page=6」の2か所を任意の数(偶数推奨)へご変更下さい。

この記事は役に立ちましたか?

もし参考になりましたら、下のボタンで教えてください。
今後の記事作成の参考とさせて頂きます!

同じテーマのカスタマイズ記事