Advertisement
alchymyth

'the-list' tagged archive content

Mar 17th, 2012
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.21 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3.         <?php if (have_posts()) : ?>
  4.  
  5.             <?php //$post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  6.  
  7.    
  8.       <?php /* If this is a category archive */ if (is_category()) { ?>
  9.         <h2 class="pagetitle"><span id="label"><?php single_cat_title(); ?></span></h2>
  10.         <div class="post" id="cat-descript">
  11.         <p><?php echo category_description(); ?></p>
  12.         </div>
  13.         <div class="section">
  14.         <p>*</p>
  15.         </div>
  16.       <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  17.         <h2 class="pagetitle">Posts Tagged &#8216;<span id="label"><?php single_tag_title(); ?></span>&#8217;</h2>
  18.         <div class="post" id="cat-descript">
  19.         <p><?php echo tag_description(); ?></p>
  20.         </div>
  21.         <div class="section">
  22.         <p>*</p>
  23.         </div>
  24.       <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  25.         <h2 class="pagetitle">Archive for <span id="label"><?php the_time('j F Y'); ?></span></h2>
  26.         <div class="section">
  27.         <p>*</p>
  28.         </div>
  29.       <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  30.         <h2 class="pagetitle">Archive for <span id="label"><?php the_time('F Y'); ?></span></h2>
  31.         <div class="section">
  32.         <p>*</p>
  33.         </div>
  34.       <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  35.         <h2 class="pagetitle">Archive for <span id="label"><?php the_time('Y'); ?></span></h2>
  36.         <div class="section">
  37.         <p>*</p>
  38.         </div>
  39.       <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  40.         <h2 class="pagetitle">Author Archive</h2>
  41.         <div class="section">
  42.         <p>*</p>
  43.         </div>
  44.       <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  45.         <h2 class="pagetitle">Blog Archives</h2>
  46.         <div class="section">
  47.         <p>*</p>
  48.         </div>
  49.       <?php } ?>
  50.  
  51.  
  52. <?php while (have_posts()) : the_post(); ?>
  53.                    
  54.     <div id="post-<?php the_ID(); ?>" <?php post_class('archive'); ?>>
  55.    
  56.         <h3><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
  57.            
  58.         <p class="byline">
  59.         <span class="category"><?php the_category(' <span class="cat-sep">/</span> ') ?></span>
  60.         <span id="byline-title">Posted</span> <a href="<?php echo wp_get_shortlink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_time('jS') ?> of <?php the_time('F, Y') ?> / <span id="tags"><?php the_tags('<span id="byline-title">Tagged:</span> ', ', ', ''); ?><?php edit_post_link('edit', '<span class="edit"> / ', '</span>'); ?></span>
  61.         </p>
  62.  
  63. <?php /* Show full post content is posts are tagged with "the list" */
  64. if (is_tag( 'the-list' )) { the_content(); } ?>
  65.  
  66.     </div><!-- end post -->
  67.        
  68. <?php endwhile; ?>
  69.                        
  70. <?php else : ?>
  71.    
  72.     <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  73.    
  74.         <h2 style="font-weight:normal">Sorry</h2>
  75.         <p>I'm not finding what you are looking for. Try another search if you'd like.</p>
  76.     </div>
  77.     <br />    
  78.     <br />
  79.     <br />
  80.     <br />
  81.     <br />
  82.  
  83.    
  84. <?php endif; ?>
  85.  
  86. <div class="indexed-page-nav">
  87.     <span class="previous"><?php next_posts_link('&larr; towards the past') ?></span>
  88.     <span class="next"><?php previous_posts_link('towards the present &rarr;') ?></span>
  89. </div>
  90.  
  91. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement