サイトアイコン アラコキからの Raspberry Pi 電子工作

固定ページに 投稿日・更新日・投稿者を表示する

WordPress Twenty Seventeen
固定ページのカスタマイズ
投稿日・更新日・投稿者を表示する
 
固定ページには、タイトルは表示されているが、「投稿日・更新日・投稿者」は表示されていない。管理面・SEO面から、これらを表示することにした。
 
 
以下、固定ページへの「投稿日・更新日・投稿者」の表示要領。
 

 

スポンサー リンク

 

 
 
template-parts/page/content-page.php を修正
 
content-page.php の場所。(子テーマにコピーして修正。)
 
content-page.php に、投稿日・更新日・投稿者を表示する処理を追記する。
<!-- ここから"font-size:8pt;">
<time class="entry-date published" datetime="<?php the_time('Y/m/d'); ?>">
     <?php the_time('Y/m/d'); ?>
</time>

<time class="updated-date updated" datetime="<?php the_modified_date('Y/m/d'); ?>">
	<?php the_modified_date('Y/m/d'); ?>
</time>

/ 投稿者稿者php the_author(); ?></div>
<!-- 投稿日稿日
 
content-page.php への追記位置。(タイトルを表示しているステートメントの上に記述した。)
 
 
以上。
(2018.09.08)
 

 

スポンサー リンク

 

             

 

 

 
モバイルバージョンを終了