content-single.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Template part for displaying posts.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Akina
  8. */
  9. ?>
  10. <?php if (iro_opt('article_auto_toc', 'true')): ?>
  11. <div class="has-toc have-toc"></div>
  12. <?php endif; ?>
  13. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  14. <?php if(should_show_title()) { ?>
  15. <header class="entry-header">
  16. <h1 class="entry-title"><?php the_title(); ?></h1>
  17. <p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date)); ?>&nbsp;&nbsp;<?php echo get_post_views(get_the_ID()).' '. _n('View','Views',get_post_views(get_the_ID()),'sakurairo')/*次阅读*/?> </p>
  18. <hr>
  19. </header><!-- .entry-header -->
  20. <?php } ?>
  21. <!--<div class="toc-entry-content"><!-- 套嵌目录使用(主要为了支援评论)-->
  22. <div class="entry-content">
  23. <?php the_content(); ?>
  24. <?php
  25. wp_link_pages( array(
  26. 'before' => '<div class="page-links">' . __( 'Pages:', 'ondemand' ),
  27. 'after' => '</div>',
  28. ) );
  29. ?>
  30. <!--<div class="oshimai"></div>-->
  31. <!--<h2 style="opacity:0;max-height:0;margin:0">Comments</h2>--><!-- 评论跳转标记 -->
  32. </div><!-- .entry-content -->
  33. <?php the_reward(); ?>
  34. <footer class="post-footer">
  35. <div class="post-tags">
  36. <?php if ( has_tag() ) { echo '<i class="iconfont icon-tags"></i> '; the_tags('', ' ', ' ');}?>
  37. </div>
  38. </footer><!-- .entry-footer -->
  39. </article><!-- #post-## -->