1
0

content.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. <article class="post post-list" itemscope="" itemtype="http://schema.org/BlogPosting">
  11. <div class="post-entry">
  12. <div class="feature">
  13. <?php if ( has_post_thumbnail() ) { ?>
  14. <a href="<?php the_permalink();?>"><div class="overlay"><i class="iconfont icon-text"></i></div><?php the_post_thumbnail(); ?></a>
  15. <?php } else {?>
  16. <a href="<?php the_permalink();?>"><div class="overlay"><i class="iconfont icon-text"></i></div><img src="<?php bloginfo('template_url'); ?>/inc/content-image/d-<?php echo rand(1,4)?>.jpg" /></a>
  17. <?php } ?>
  18. </div>
  19. <h1 class="entry-title"><a href="<?php the_permalink();?>"><?php the_title();?></a></h1>
  20. <div class="p-time">
  21. <?php if(is_sticky()) : ?>
  22. <i class="iconfont hotpost icon-hot"></i>
  23. <?php endif ?>
  24. <i class="iconfont icon-time"></i><?php echo poi_time_since(strtotime($post->post_date)); ?>
  25. </div>
  26. <?php the_excerpt(); ?>
  27. <footer class="entry-footer">
  28. <div class="post-more">
  29. <a href="<?php the_permalink(); ?>"><i class="iconfont icon-caidan"></i></a>
  30. </div>
  31. <div class="info-meta">
  32. <div class="comnum">
  33. <span>
  34. <i class="iconfont icon-mark"></i>
  35. <?php comments_popup_link(__("NOTHING","sakurairo"), __("1 Comment","sakurairo")/*条评论*/, '% '.__("Comments","sakurairo")/*条评论*/,'',__("Comment Closed","sakurairo")/**评论关闭 */); ?>
  36. </span>
  37. </div>
  38. <div class="views">
  39. <span><i class="iconfont icon-attention"></i><?php echo get_post_views(get_the_ID()).' '._n('Hit','Hits',get_post_views(get_the_ID()),'sakurairo')/*热度*/?></span>
  40. </div>
  41. </div>
  42. </footer><!-- .entry-footer -->
  43. </div>
  44. <hr>
  45. </article><!-- #post-## -->