content-category.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 works-list" itemscope="" itemtype="http://schema.org/BlogPosting">
  11. <div class="works-entry">
  12. <div class="works-main">
  13. <div class="works-feature">
  14. <?php if ( has_post_thumbnail() ) { ?>
  15. <a href="<?php the_permalink();?>"><?php the_post_thumbnail('large'); ?></a>
  16. <?php } else {?>
  17. <a href="<?php the_permalink();?>"><img src="<?php echo DEFAULT_FEATURE_IMAGE(); ?>" /></a>
  18. <?php } ?>
  19. </div>
  20. <div class="works-overlay">
  21. <h1 class="works-title"><a href="<?php the_permalink();?>"><?php the_title();?></a></h1>
  22. <div class="works-p-time">
  23. <i class="fa-solid fa-calendar-day"></i> <?php echo poi_time_since(strtotime($post->post_date));//the_time('Y-m-d');?>
  24. </div>
  25. <div class="works-meta">
  26. <div class="works-comnum">
  27. <span><i class="fa-regular fa-comment"></i>
  28. <?php comments_popup_link(__("NOTHING","sakurairo"), __("1 Comment","sakurairo")/*条评论*/, '% '.__("Comments","sakurairo")/*条评论*/,'',__("Comment Closed","sakurairo")/**评论关闭 */); ?>
  29. </span>
  30. </div>
  31. <div class="works-views">
  32. <span><i class="fa-regular fa-eye"></i> <?php echo get_post_views(get_the_ID()); ?> </span>
  33. </div>
  34. </div>
  35. <a class="worksmore" href="<?php the_permalink(); ?>"></a>
  36. </div>
  37. <!-- .entry-footer -->
  38. </div>
  39. </div>
  40. </article><!-- #post-## -->