Skip to content

Instantly share code, notes, and snippets.

@pandanote-info
Last active June 25, 2017 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pandanote-info/a97113568dad1308bc387696ee333bc8 to your computer and use it in GitHub Desktop.
Save pandanote-info/a97113568dad1308bc387696ee333bc8 to your computer and use it in GitHub Desktop.
Iconic Oneテーマで各記事の最終更新日を表示するための修正用の差分コード。
--- content.php.ORG 2017-06-25 00:07:58.831052983 +0900
+++ content.php 2017-06-25 10:50:23.258825536 +0900
@@ -28,7 +28,12 @@
<span class="fn"><?php echo the_author_posts_link(); ?></span>
</span>
<span class="meta-sep">|</span>
- <span class="date updated"><?php echo get_the_date(); ?></span>
+ <span class="date updated"><?php echo get_the_date(); ?>
+ <?php if (get_the_modified_date('Y/n/j') != get_the_time('Y/n/j')) :
+ echo (wp_is_mobile())?", &#9200; : ":", Last update: ";
+ echo get_the_modified_date(); ?>
+ <?php endif; ?>
+ </span>
</div>
<div class="adt-comment">
<a class="link-comments" href="<?php comments_link(); ?>"><?php comments_number(__('0 Comment','iconic-one'),__('1 Comment','iconic-one'),__('% Comments','iconic-one')); ?></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment