This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 19th, 2013  |  syntax: PHP  |  size: 3.23 KB  |  views: 86  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. get_header(); ?>
  2.  
  3. <section id="primary" class="content-area">
  4. <div id="content" class="site-content" role="main">
  5.  
  6. <?php if ( have_posts() ) : ?>
  7.  
  8. <header class="page-header">
  9.     <h1 class="page-title">
  10.         <?php
  11.             if ( is_category() ) {
  12.                 printf( __( 'Category Archives: %s', 'ads' ), '<span>' . single_cat_title( '', false ) . '</span>' );
  13.  
  14.             } elseif ( is_tag() ) {
  15.                 printf( __( 'Tag Archives: %s', 'ads' ), '<span>' . single_tag_title( '', false ) . '</span>' );
  16.  
  17.             } elseif ( is_author() ) {
  18.                 /* Queue the first post, that way we know
  19.                  * what author we're dealing with (if that is the case).
  20.                 */
  21.                 the_post();
  22.                 printf( __( 'Author Archives: %s', 'ads' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( "ID" ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
  23.                 /* Since we called the_post() above, we need to
  24.                  * rewind the loop back to the beginning that way
  25.                  * we can run the loop properly, in full.
  26.                  */
  27.                 rewind_posts();
  28.  
  29.             } elseif ( is_day() ) {
  30.                 printf( __( 'Daily Archives: %s', 'ads' ), '<span>' . get_the_date() . '</span>' );
  31.  
  32.             } elseif ( is_month() ) {
  33.                 printf( __( 'Monthly Archives: %s', 'ads' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
  34.  
  35.             } elseif ( is_year() ) {
  36.                 printf( __( 'Yearly Archives: %s', 'ads' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
  37.  
  38.             } else {
  39.                 _e( 'Archives', 'ads' );
  40.  
  41.             }
  42.         ?>
  43.     </h1>
  44.     <?php
  45.         if ( is_category() ) {
  46.             // show an optional category description
  47.             $category_description = category_description();
  48.             if ( ! empty( $category_description ) )
  49.                 echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
  50.  
  51.         } elseif ( is_tag() ) {
  52.             // show an optional tag description
  53.             $tag_description = tag_description();
  54.             if ( ! empty( $tag_description ) )
  55.                 echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
  56.         }
  57.     ?>
  58. </header><!-- .page-header -->
  59.  
  60. <?php ads_content_nav( 'nav-above' ); ?>
  61.  
  62. <?php /* Start the Loop */ ?>
  63. <?php while ( have_posts() ) : the_post(); ?>
  64.  
  65.     <?php
  66.         /* Include the Post-Format-specific template for the content.
  67.          * If you want to overload this in a child theme then include a file
  68.          * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  69.          */
  70.         get_template_part( 'content', get_post_format() );
  71.     ?>
  72.  
  73. <?php endwhile; ?>
  74.  
  75. <?php ads_content_nav( 'nav-below' ); ?>
  76.  
  77. <?php else : ?>
  78.  
  79. <?php get_template_part( 'no-results', 'archive' ); ?>
  80.  
  81. <?php endif; ?>
  82.  
  83. </div><!-- #content .site-content -->
  84. </section><!-- #primary .content-area -->
  85.  
  86. <?php get_sidebar(); ?>
  87. <?php get_footer(); ?>
clone this paste RAW Paste Data