1
0

content.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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="fa-solid fa-box-archive"></i></div><?php the_post_thumbnail(); ?></a>
  15. <?php } else {?>
  16. <a href="<?php the_permalink();?>"><div class="overlay"><i class="fa-solid fa-box-archive"></i></div><img src="<?=iro_opt('vision_resource_basepath')?>basic/content-image-<?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="fa-regular fa-gem"></i>
  23. <?php endif ?>
  24. <i class="fa-regular fa-clock"></i><?php echo poi_time_since(strtotime($post->post_date)); ?>
  25. </div>
  26. <?php the_excerpt(); ?>
  27. <footer class="entry-footer">
  28. <div class="info-meta">
  29. <div class="comnum">
  30. <span>
  31. <i class="fa-regular fa-comment"></i>
  32. <?php comments_popup_link(__("NOTHING","sakurairo"), __("1 Comment","sakurairo")/*条评论*/, '% '.__("Comments","sakurairo")/*条评论*/,'',__("Comment Closed","sakurairo")/**评论关闭 */); ?>
  33. </span>
  34. </div>
  35. <div class="views">
  36. <span><i class="fa-regular fa-eye"></i><?php echo get_post_views(get_the_ID()).' '._n('Hit','Hits',get_post_views(get_the_ID()),'sakurairo')/*热度*/?></span>
  37. </div>
  38. </div>
  39. </footer><!-- .entry-footer -->
  40. </div>
  41. <hr>
  42. </article><!-- #post-## -->