Guest User

Untitled

a guest
Nov 14th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div class="archive-box">
  4.  
  5. <?php
  6. if ( is_day() ) :
  7. echo wp_kses( __( '<span>Daily Archives:</span>', 'sprout-spoon' ), array( 'span' => array( 'class' => array() ) ) );
  8.  
  9. printf( wp_kses( __( '<h1>%s</h1>', 'sprout-spoon' ), array( 'h1' => array( 'class' => array() ) ) ), get_the_date() );
  10.  
  11. elseif ( is_month() ) :
  12.  
  13.  
  14. echo wp_kses( __( '<span>Monthly Archives:</span>', 'sprout-spoon' ), array( 'span' => array( 'class' => array() ) ) );
  15.  
  16. printf( wp_kses( __( '<h1>%s</h1>', 'sprout-spoon' ), array( 'h1' => array( 'class' => array() ) ) ), get_the_date( _x( 'F Y', 'monthly archives date format', 'sprout-spoon' ) ) );
  17.  
  18.  
  19. elseif ( is_year() ) :
  20.  
  21. echo wp_kses( __( '<span>Yearly Archives:</span>', 'sprout-spoon' ), array( 'span' => array( 'class' => array() ) ) );
  22.  
  23. printf( wp_kses( __( '<h1>%s</h1>', 'sprout-spoon' ), array( 'h1' => array( 'class' => array() ) ) ), get_the_date( _x( 'Y', 'yearly archives date format', 'sprout-spoon' ) ) );
  24.  
  25.  
  26. else :
  27. echo wp_kses( __( '<h1>Archives:</h1>', 'sprout-spoon' ), array( 'h1' => array( 'class' => array() ) ) );
  28.  
  29. endif;
  30. ?>
  31.  
  32. </div>
  33.  
  34. <div class="container">
  35.  
  36. <div id="content">
  37.  
  38. <div id="main" <?php if(get_theme_mod('sprout_spoon_sidebar_archive') == true) : ?>class="fullwidth"<?php endif; ?>>
  39.  
  40. <?php if(get_theme_mod('sprout_spoon_archive_layout') == 'grid3' || get_theme_mod('sprout_spoon_archive_layout') == 'full_grid3') : ?>
  41. <ul class="sp-grid col3">
  42. <?php elseif(get_theme_mod('sprout_spoon_archive_layout') == 'grid2' || get_theme_mod('sprout_spoon_archive_layout') == 'full_grid2') : ?>
  43. <ul class="sp-grid col2">
  44. <?php endif; ?>
  45.  
  46. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  47.  
  48. <?php if(get_theme_mod('sprout_spoon_archive_layout') == 'grid3' || get_theme_mod('sprout_spoon_archive_layout') == 'grid2') : ?>
  49.  
  50. <?php get_template_part('content', 'grid'); ?>
  51.  
  52. <?php elseif(get_theme_mod('sprout_spoon_archive_layout') == 'full_grid3' || get_theme_mod('sprout_spoon_archive_layout') == 'full_grid2') : ?>
  53.  
  54. <?php if( $wp_query->current_post == 0 && !is_paged() ) : ?>
  55. <?php get_template_part('content'); ?>
  56. <?php else : ?>
  57. <?php get_template_part('content', 'grid'); ?>
  58. <?php endif; ?>
  59.  
  60. <?php elseif(get_theme_mod('sprout_spoon_archive_layout') == 'list') : ?>
  61.  
  62. <?php get_template_part('content', 'list'); ?>
  63.  
  64. <?php elseif(get_theme_mod('sprout_spoon_archive_layout') == 'full_list') : ?>
  65.  
  66. <?php if( $wp_query->current_post == 0 && !is_paged() ) : ?>
  67. <?php get_template_part('content'); ?>
  68. <?php else : ?>
  69. <?php get_template_part('content', 'list'); ?>
  70. <?php endif; ?>
  71.  
  72. <?php else : ?>
  73.  
  74. <?php get_template_part('content'); ?>
  75.  
  76. <?php endif; ?>
  77.  
  78. <?php endwhile; ?>
  79.  
  80. <?php if(get_theme_mod('sprout_spoon_archive_layout') == 'grid3' || get_theme_mod('sprout_spoon_archive_layout') == 'full_grid3' || get_theme_mod('sprout_spoon_archive_layout') == 'grid2' || get_theme_mod('sprout_spoon_archive_layout') == 'full_grid2') : ?></ul><?php endif; ?>
  81.  
  82. <?php echo function_exists( 'FWP' ) ? facetwp_display( 'pager' ) : ''; ?>
  83.  
  84. <?php else : ?>
  85.  
  86. <?php get_template_part('content', 'none'); ?>
  87.  
  88. <?php endif; ?>
  89.  
  90. </div>
  91.  
  92. <?php if(get_theme_mod('sprout_spoon_sidebar_archive')) : else : ?><?php get_sidebar(); ?><?php endif; ?>
  93. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment