Advertisement
Guest User

Untitled

a guest
Jan 18th, 2016
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * Archive.php renders your categories, tags and archive pages
  4.  * @package Thoughts WordPress Theme
  5.  * @since 1.0
  6.  * @author AJ Clarke : http://wpexplorer.com
  7.  * @copyright Copyright (c) 2012, AJ Clarke
  8.  * @link http://wpexplorer.com
  9.  * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  10.  */
  11. get_header(); // Loads the header.php template
  12. //start loop
  13. if(have_posts()) : ?>
  14.  
  15. <header id="page-heading">
  16.     <?php $post = $posts[0]; ?>
  17.     <?php if (is_category()) { ?>
  18.     <h1><span class="wpex-icon-copy"></span><?php single_cat_title(); ?></h1>
  19. <span class="category-description"><?php echo category_description( ); ?></span>
  20.     <?php } elseif( is_tag() ) { ?>
  21.     <h1><span class="wpex-icon-tags"></span><?php single_tag_title(); ?></h1>
  22.     <?php  } elseif (is_day()) { ?>
  23.     <h1><span class="wpex-icon-calendar"></span><?php the_time('F jS, Y'); ?></h1>
  24.     <?php  } elseif (is_month()) { ?>
  25.     <h1><span class="wpex-icon-calendar"></span> <?php the_time('F, Y'); ?></h1>
  26.     <?php  } elseif (is_year()) { ?>
  27.     <h1><span class="wpex-icon-calendar"></span> <?php the_time('Y'); ?></h1>
  28.     <?php  } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  29.     <h1><?php _e('Archives','wpex'); ?></h1>
  30.     <?php } ?>
  31. </header><!-- /page-heading -->
  32.  
  33. <div id="blog-wrap" class="clearfix">
  34.     <?php
  35.     while (have_posts()) : the_post();
  36.         get_template_part( 'content', get_post_format() ); //get the post content  
  37.     endwhile;
  38.     ?>    
  39. </div><!-- /blog-wrap -->
  40.  
  41. <?php
  42. wpex_pagination(); // Paginate your posts
  43. endif;  // end if have_posts()
  44. get_footer(); //get template footer ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement