賢威 記事省略「この投稿の続きを読む」の表示を変更する
<!–more–>を使用した場合の、記事省略される「この投稿の続きを読む」の
表示方法の変更方法を説明します
ダッシュボード⇒外観⇒テーマ編集から
メインインデックスのテンプレート (index.php)をクリックします。
<div class="contents">
<?php the_content(__(‘Read the rest of this entry »’, ‘keni‘)); ?>
を変更します。
見方ですが、
Read the rest of this entry の部分が「この記事の続きは」を現し
「»」は特殊記号は「»」と表します。
「»」がいらない場合は、
content(__(‘Read the rest of this entry’, ‘keni‘)); ?>
<div class="contents">
<?php the_content(__(‘この記事の続きはこちら’)); ?>
と表示されます。
これで簡単に変更できます。
タイトル名+続きを読む »にしたい場合
<div class="contents"> <?php the_content( the_title('','',false) . 'の続きを読む »' ); ?>
を入力する事で、タイトル名+続きを読む »にする事ができます。
表示例
このようにタイトルが自動的に適用されます。
以上
賢威 記事省略「この投稿の続きを読む」の表示を変更するでした。