// 繰り返し処理開始 $count += 1; global $g_list_index; $g_list_index = $count - 1; //インデックスなので-1 //一覧リストのスタイル if (is_list_style_bodies()) { //一覧表示スタイルが本文表示 get_template_part('entry-body'); //一覧表示スタイルが本文表示の場合 } else { if (is_list_style_large_cards()) { //大きなエントリーカードの場合 get_template_part('entry-card-large'); } else { if (is_list_style_large_card_just_for_first()) { //最初だけ大きなエントリーカードの場合 //最初だけ大きなものであとは普通のエントリーカード if (is_home() && !is_paged() && $count == 1) { get_template_part('entry-card-large'); } else { get_template_part('entry-card'); } } else { if (is_list_style_body_just_for_first()) { //最初だけ本文表示の場合 //最初だけ本文表示であとは普通のエントリーカード if (is_home() && !is_paged() && $count == 1) { get_template_part('entry-body'); } else { get_template_part('entry-card');
<?php //エントリーカードのコンテンツ部分のテンプレート //通常のエントリーカードクラス $entry_class = 'entry-card-content'; //通常のエントリーカードの場合意外 if (is_list_style_large_cards() || is_list_style_large_card_just_for_first() && is_list_index_first()) { $entry_class = 'entry-card-large-content'; } ?> <div class="<?php echo $entry_class; ?> "> <header> <h2><a href="<?php the_permalink(); ?> " class="entry-title entry-title-link" title="<?php the_title(); ?> "><?php the_title(); ?> </a></h2> <p class="post-meta"> <?php if (is_create_date_visible()) { //投稿日を表示する場合 ?> <span class="post-date"><span class="fa fa-clock-o fa-fw"></span><span class="published"><?php
function is_entry_card_style() { return is_list_style_entry_cards() || is_list_style_large_card_just_for_first() || is_list_style_body_just_for_first(); }