Advertisement
Guest User

Untitled

a guest
Dec 4th, 2011
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.75 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Archive Page
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8. <div id ="maincontent"class = "group">
  9.     <?php if ( function_exists('yoast_breadcrumb') ) {
  10.  
  11.         yoast_breadcrumb('<p id="breadcrumbs">','</p>');
  12.  
  13.         } ?>
  14.         <?php include'leftsidebar.php';?>
  15.     <div id = "allcontent"class="archive">
  16.    
  17.     <?php if (have_posts()) : ?>
  18.  
  19.         <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  20.  
  21.         <?php /* If this is a category archive */ if (is_category()) { ?>
  22.             <h2>Archive for the &#8216;<?php single_cat_title(); ?>&#8217; Category</h2>
  23.  
  24.         <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  25.             <h2>Posts Tagged &#8216;<?php single_tag_title(); ?>&#8217;</h2>
  26.  
  27.         <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  28.             <h2>Archive for <?php the_time('F jS, Y'); ?></h2>
  29.  
  30.         <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  31.             <h2>Archive for <?php the_time('F, Y'); ?></h2>
  32.  
  33.         <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  34.             <h2>Archive for <?php the_time('Y'); ?></h2>
  35.  
  36.         <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  37.             <h2>Author Archive</h2>
  38.  
  39.         <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  40.             <h2>Blog Archives</h2>
  41.  
  42.         <?php } ?>
  43.  
  44.         <?php include (TEMPLATEPATH . '/inc/nav.php' );?>
  45.    
  46.         <ul>
  47.         <?php $i=0;?>
  48.     <?php $x=0;?>
  49.         <?php while (have_posts()) : the_post(); ?>
  50.             <?php $i++; ?>
  51.             <li class ="group">
  52.             <div <?php post_class() ?>>
  53.        
  54.             <div class="title_meta">
  55.                      <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
  56.                 <?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>
  57.         <?php _trackableshare_embed(); ?>
  58.         </div>
  59.                 <div class="entry">    
  60.              <?php the_advanced_excerpt('length=220&use_words=0&no_custom=1&ellipsis=%26hellip;&exclude_tags=strong');?>
  61.                
  62.             </div>
  63.        
  64.             </div>
  65.             </li>
  66.             <?php
  67.             $Archive_Ads = array(
  68.             'Archive Ad1',
  69.             'Archive Ad2',
  70.             'Archive Ad3'
  71.             );
  72.             if ($i % 3 === 0):
  73.        
  74.         if (function_exists('dynamic_sidebar')) :/*this is the line 69*/
  75.         dynamic_sidebar($Archive_Ads[($x)]);
  76.     $x++;
  77.         endif;
  78.     endif;
  79.             ?>
  80.  
  81.         <?php endwhile; ?>
  82.         </ul>
  83.  
  84.  
  85.  
  86.         <?php include (TEMPLATEPATH . '/inc/nav.php' ); ?>
  87.  
  88. <?php else : ?>
  89.  
  90.     <h2>Nothing found</h2>
  91.  
  92. <?php endif; ?>
  93.  
  94.  
  95.     </div>
  96. </div>
  97. <?php get_footer(); ?>
  98.  
  99.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement