TwentySixteenではDefaultでは全てのコンテンツが表示されるようでR。
よく見る「続きを読む」が出ないので、それを出すようにしたいのでR。
そこで、
「ダッシュボード」→「外観」→「テーマ編集」で、「content.php」をいじるのでR。
「content.php」を覗くと、
<div class="entry-content"> <?php /* translators: %s: Name of current post */ the_content( sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), get_the_title() ) ); wp_link_pages( array( 'before' => ' <div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', 'after' => '</div> ', 'link_before' => '<span>', 'link_after' => '</span>', 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%', 'separator' => '<span class="screen-reader-text">, </span>', ) ); ?> </div> <!-- .entry-content -->
が見つかるのでR。この中の
「the_content」を「the_excerpt」に変えると
「続きを読む」が出るのでR。
こちらを参考したのでR。
(広告)月額900円(税抜)から、高速・多機能・高安定レンタルサーバー『エックスサーバー』


この記事をシェアできます。