archive.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * The template for displaying archive pages.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Akina
  8. */
  9. get_header(); ?>
  10. <div id="primary" class="content-area">
  11. <main id="main" class="site-main" role="main">
  12. <?php
  13. if (have_posts()) : ?>
  14. <?php if (!iro_opt('patternimg') || !z_taxonomy_image_url()) { ?>
  15. <header class="page-header">
  16. <h1 class="cat-title"><?php single_cat_title('', true); ?></h1>
  17. <span class="cat-des">
  18. <?php
  19. if (category_description() != "") {
  20. echo "" . category_description();
  21. }
  22. ?>
  23. </span>
  24. </header><!-- .page-header -->
  25. <?php } // page-header
  26. ?>
  27. <?php
  28. if (iro_opt('image_category') && is_category(explode(',', iro_opt('image_category')))) {
  29. while (have_posts()) : the_post();
  30. get_template_part('tpl/content', 'category');
  31. endwhile;
  32. } else {
  33. if (iro_opt('post_list_style') == 'akinastyle') {
  34. while (have_posts()) : the_post();
  35. get_template_part('tpl/content', get_post_format());
  36. endwhile;
  37. } else {
  38. get_template_part('tpl/content', 'thumb');
  39. }
  40. }
  41. ?>
  42. <div class="clearer"></div>
  43. <?php else :
  44. get_template_part('tpl/content', 'none');
  45. endif; ?>
  46. </main><!-- #main -->
  47. <?php if (iro_opt('pagenav_style') == 'ajax') { ?>
  48. <div id="pagination" <?php if (iro_opt('image_category') && is_category(explode(',', iro_opt('image_category')))) echo 'class="pagination-archive"'; ?>><?php next_posts_link(__(' Previous', 'sakurairo')); ?></div>
  49. <div id="add_post"><span id="add_post_time" style="visibility: hidden;" title="<?php echo iro_opt('page_auto_load', ''); ?>"></span></div>
  50. <?php } else { ?>
  51. <nav class="navigator">
  52. <?php previous_posts_link('<i class="iconfont icon-back"></i>') ?><?php next_posts_link('<i class="iconfont icon-right"></i>') ?>
  53. </nav>
  54. <?php } ?>
  55. </div><!-- #primary -->
  56. <?php
  57. get_footer();