daily pastebin goal
20%
SHARE
TWEET

archive.php

a guest Mar 2nd, 2011 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php get_header(); ?>
  2. <div class="art-content-layout">
  3.     <div class="art-content-layout-row">
  4. <div class="art-layout-cell art-content">
  5.  
  6.  
  7. <?php is_tag(); ?>
  8. <?php if (have_posts()) : ?>
  9.  
  10. <div class="art-post">
  11.     <div class="art-post-body">
  12. <div class="art-post-inner art-article">
  13.  
  14. <div class="art-postcontent">
  15.     <!-- article-content -->
  16.  
  17.  
  18. <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  19. <?php /* If this is a category archive */ if (is_category()) { ?>
  20. <h2 class="pagetitle"><?php printf(__('Archive for the &#8216;%s&#8217; Category', 'kubrick'), single_cat_title('', false)); ?></h2>
  21. <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  22. <h2 class="pagetitle"><?php printf(__('Posts Tagged &#8216;%s&#8217;', 'kubrick'), single_tag_title('', false) ); ?></h2>
  23. <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  24. <h2 class="pagetitle"><?php printf(_c('Archive for %s|Daily archive page', 'kubrick'), get_the_time(__('F jS, Y', 'kubrick'))); ?></h2>
  25. <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  26. <h2 class="pagetitle"><?php printf(_c('Archive for %s|Monthly archive page', 'kubrick'), get_the_time(__('F, Y', 'kubrick'))); ?></h2>
  27. <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  28. <h2 class="pagetitle"><?php printf(_c('Archive for %s|Yearly archive page', 'kubrick'), get_the_time(__('Y', 'kubrick'))); ?></h2>
  29. <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  30. <h2 class="pagetitle"><?php _e('Author Archive', 'kubrick'); ?></h2>
  31. <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  32. <h2 class="pagetitle"><?php _e('Blog Archives', 'kubrick'); ?></h2>
  33. <?php } ?>
  34.  
  35. <?php
  36. $prev_link = get_previous_posts_link(__('Newer Entries &raquo;', 'kubrick'));
  37. $next_link = get_next_posts_link(__('&laquo; Older Entries', 'kubrick'));
  38. ?>
  39.  
  40. <?php if ($prev_link || $next_link): ?>
  41. <div class="navigation">
  42.         <div class="alignleft"><?php echo $next_link; ?></div>
  43.         <div class="alignright"><?php echo $prev_link; ?></div>
  44. </div>
  45. <?php endif; ?>
  46.  
  47.  
  48.     <!-- /article-content -->
  49. </div>
  50. <div class="cleared"></div>
  51.  
  52.  
  53. </div>
  54.  
  55.                 <div class="cleared"></div>
  56.     </div>
  57. </div>
  58.  
  59.  
  60.  
  61. <?php while (have_posts()) : the_post(); ?>
  62. <div class="art-post">
  63.     <div class="art-post-body">
  64. <div class="art-post-inner art-article">
  65. <?php ob_start(); ?>
  66. <h2 class="art-postheader">
  67.   <img src="<?php bloginfo('template_url'); ?>/images/postheadericon.png" width="26" height="25" alt="postheadericon" />
  68. <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
  69. <?php the_title(); ?>
  70. </a>
  71. </h2>
  72. <?php $icons = array(); ?>
  73. <?php if (!is_page()): ?><?php ob_start(); ?><?php the_time(__('F jS, Y', 'kubrick')) ?>
  74. <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page()): ?><?php ob_start(); ?><?php _e('Author', 'kubrick'); ?>: <?php the_author_posts_link() ?>
  75. <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
  76. <div class="art-postheadericons art-metadata-icons">
  77. <?php echo implode(' | ', $icons); ?>
  78.  
  79. </div>
  80. <?php endif; ?>
  81. <?php $metadataContent = ob_get_clean(); ?>
  82. <?php if (trim($metadataContent) != ''): ?>
  83. <div class="art-postmetadataheader">
  84. <?php echo $metadataContent; ?>
  85.  
  86. </div>
  87. <?php endif; ?>
  88. <div class="art-postcontent">
  89.     <!-- article-content -->
  90.  
  91.           <?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
  92.           <?php if (is_page() or is_single()) wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
  93.        
  94.     <!-- /article-content -->
  95. </div>
  96. <div class="cleared"></div>
  97. <?php $icons = array(); ?>
  98. <?php if (!is_page()): ?><?php ob_start(); ?><?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
  99. <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && get_the_tags()): ?><?php ob_start(); ?><?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>
  100. <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && !is_single()): ?><?php ob_start(); ?><?php comments_popup_link(__('No Comments &#187;', 'kubrick'), __('1 Comment &#187;', 'kubrick'), __('% Comments &#187;', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
  101. <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
  102. <div class="art-postfootericons art-metadata-icons">
  103. <?php echo implode(' | ', $icons); ?>
  104.  
  105. </div>
  106. <?php endif; ?>
  107.  
  108. </div>
  109.  
  110.                 <div class="cleared"></div>
  111.     </div>
  112. </div>
  113.  
  114. <?php endwhile; ?>
  115.  
  116. <?php if ($prev_link || $next_link): ?>
  117. <div class="art-post">
  118.     <div class="art-post-body">
  119. <div class="art-post-inner art-article">
  120.  
  121. <div class="art-postcontent">
  122.     <!-- article-content -->
  123.  
  124. <div class="navigation">
  125.         <div class="alignleft"><?php echo $next_link; ?></div>
  126.         <div class="alignright"><?php echo $prev_link; ?></div>
  127. </div>
  128.  
  129.     <!-- /article-content -->
  130. </div>
  131. <div class="cleared"></div>
  132.  
  133.  
  134. </div>
  135.  
  136.                 <div class="cleared"></div>
  137.     </div>
  138. </div>
  139.  
  140. <?php endif; ?>
  141.  
  142. <?php else : ?>
  143. <div class="art-post">
  144.     <div class="art-post-body">
  145. <div class="art-post-inner art-article">
  146.  
  147. <div class="art-postcontent">
  148.     <!-- article-content -->
  149.  
  150. <?php
  151.         if ( is_category() ) { // If this is a category archive
  152.                 printf("<h2 class='center'>".__("Sorry, but there aren't any posts in the %s category yet.", "kubrick").'</h2>', single_cat_title('',false));
  153.         } else if ( is_date() ) { // If this is a date archive
  154.                 echo('<h2>'.__("Sorry, but there aren't any posts with this date.", "kubrick").'</h2>');
  155.         } else if ( is_author() ) { // If this is a category archive
  156.                 $userdata = get_userdatabylogin(get_query_var('author_name'));
  157.                 printf("<h2 class='center'>".__("Sorry, but there aren't any posts by %s yet.", "kubrick")."</h2>", $userdata->display_name);
  158.         } else {
  159.                 echo("<h2 class='center'>".__('No posts found.', 'kubrick').'</h2>');
  160.         }
  161.         if(function_exists('get_search_form')) get_search_form();
  162. ?>
  163.  
  164.     <!-- /article-content -->
  165. </div>
  166. <div class="cleared"></div>
  167.  
  168.  
  169. </div>
  170.  
  171.                 <div class="cleared"></div>
  172.     </div>
  173. </div>
  174.  
  175. <?php endif; ?>
  176.  
  177.  
  178. </div>
  179. <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
  180.     </div>
  181. </div>
  182. <div class="cleared"></div>
  183.  
  184. <?php get_footer(); ?>
RAW Paste Data
Top