Advertisement
Guest User

archive.php

a guest
Jan 20th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <main class="clearfix" id="content" role="main" itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog">
  4.  
  5. <header class="entry-header" itemscope="itemscope" itemtype="http://schema.org/WPHeader">
  6.  
  7. <?php if ( is_day() ) : ?>
  8.  
  9. <h1 class="entry-title" itemprop="headline"><?php printf( __( 'Day: %s', 'reply' ), get_the_date() ); ?></h1>
  10.  
  11. <?php elseif ( is_month() ) : ?>
  12.  
  13. <h1 class="entry-title" itemprop="headline"><?php printf( __( 'Month: %s', 'reply' ), get_the_date( 'F Y' ) ); ?></h1>
  14.  
  15. <?php elseif ( is_year() ) : ?>
  16.  
  17. <h1 class="entry-title" itemprop="headline"><?php printf( __( 'Year: %s', 'reply' ), get_the_date( 'Y' ) ); ?></h1>
  18.  
  19. <?php elseif ( is_category() ) : ?>
  20.  
  21. <h1 class="entry-title" itemprop="headline"><?php printf( __( 'Category: %s', 'reply' ), single_cat_title( '', false ) ); ?></h1>
  22. <div class="entry-excerpt" itemprop="text">
  23. <?php echo category_description(); ?>
  24. </div>
  25.  
  26. <?php elseif ( is_tag() ) : ?>
  27.  
  28. <h1 class="entry-title" itemprop="headline"><?php printf( __( 'Tagged: %s', 'reply' ), single_tag_title( '', false ) ); ?></h1>
  29.  
  30. <?php elseif ( is_author( $author ) ) : ?>
  31.  
  32. <?php $curauth = get_queried_object(); ?>
  33.  
  34. <?php echo get_avatar( get_the_author_meta( 'email' ), '64', get_the_author() ); ?>
  35. <h1 class="entry-title" itemprop="headline"><?php echo $curauth->display_name; ?></h1>
  36. <div class="entry-excerpt" itemprop="text">
  37. <?php echo $curauth->description; ?>
  38. </div>
  39.  
  40. <?php else : ?>
  41.  
  42. <h1 class="entry-title" itemprop="headline"><?php single_post_title(); ?></h1>
  43.  
  44. <?php endif; ?>
  45.  
  46. </header>
  47.  
  48. <hr />
  49.  
  50. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  51.  
  52. <!-- Article -->
  53. <article <?php post_class( 'clearfix' ); ?> itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost">
  54.  
  55. <?php
  56. $format = get_post_format();
  57. get_template_part( 'content', $format );
  58. ?>
  59.  
  60. </article>
  61.  
  62. <?php endwhile; ?>
  63.  
  64. <?php if ( $wp_query->max_num_pages > 1 ) : ?>
  65.  
  66. <!--Pagination-->
  67. <ul class="pagination clearfix">
  68. <li class="prev"><?php next_posts_link( __( 'Older Posts', 'reply' ) ); ?></li>
  69. <li class="next"><?php previous_posts_link( __( 'Newer Posts', 'reply' ) ); ?></li>
  70. </ul>
  71.  
  72. <?php endif; ?>
  73.  
  74. <?php endif; ?>
  75.  
  76. </main>
  77.  
  78. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement