1. カスタム投稿タイプのアーカイブ表示の際、各記事の抜粋文を出力する
taxonomy.php (普通の投稿のときは、archive.php )で記事表示のテンプレートファイルを指定し直す
get_template_part( 'content-archive', get_post_format() );
2.content.phpをコピーしてcontent-archive.phpを作成して修正する
(余分なところをコメントアウト)
<?php// if ( is_search() ) : // Only display Excerpts for Search ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php// else : ?> <div class="entry-content post_content"> <?php// the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'citizen-journal' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'citizen-journal' ), 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php// endif; ?>
抜粋文がない場合は、本文の最初の110文字が表示される。