Advertisement
deeve

tmpl-archive-cat-month.php

May 17th, 2012
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.66 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Tmpl - Archive Cat Month
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7. <div class="lead-content-wrapper">
  8. <div id="lead-content">
  9. <div id="notepad-header"></div>
  10. <div id="content-notepad">
  11.   <div id="sidebar">
  12.   <?php //get sidebar menu items
  13.                         include (TEMPLATEPATH . "/inc/sub-menu-accordion.php"); ?>
  14.   </div><!-- /sidebar -->              
  15.                        
  16.    
  17.   <div class="content">
  18.   <?php $year = $_GET['year']; $month = $_GET['month']; $cat = $_GET['cat'];
  19.   $args = array(
  20.             'posts_per_page' => -1,
  21.             'cat'        => 7,
  22.             'year'       => $y,
  23.             'monthnum'   => $m
  24.         );
  25.         $cat_q = new WP_Query( $args );
  26.         if ( $cat_q->have_posts() ) {
  27.             $p = 0;
  28.             while ( $cat_q->have_posts() ) {
  29.                 $cat_q->the_post();
  30.                 $p++;
  31.             }
  32.             echo '<div class="post">
  33.  <div class="entry">
  34.  <div id="newsimg">
  35.  <?php  if(function_exists('get_the_image')) { get_the_image(array('default_size' => 'medium', 'image_scan' => true, 'link_to_post' => false)); } ?>
  36.  </div>
  37.  <div id="authors"><strong>Posted by:</strong><br /><?php the_author_posts_link() ?><strong><br //><br //>Date Posted:</strong><br /><?php the_time('d F, Y') ?>
  38.  </div>
  39.  Testing
  40.  <h2><?php the_title(); ?></h2>
  41.  <br //>
  42.  <br //>
  43.  <?php the_content(); ?>    
  44.  </div>
  45.  
  46.  <p class="postmetadata">Posted in <?php the_category(', '); ?></p>
  47. </div> <!-- closes the first div box -->
  48. <hr />
  49. <?php endwhile; else: ?>
  50. <p>Sorry, no posts matched your criteria.</p>
  51. <?php endif; ?>
  52. <span class="divider-border"></span>
  53.    <!-- end .content --></div>
  54.  
  55. <span class="divider-border"></span>
  56.    <!-- end .content --></div>';
  57.         }
  58. wp_reset_query();
  59.         $m--;
  60.     }
  61.     $y--;
  62. }
  63. ?>
  64.     </div><!-- /notepad-content -->
  65.     <div id="secondary-content-sub">      
  66.     <!-- end .footer --></div>
  67.     <div class="footer2">
  68.     <script language="javascript">
  69. function SimpleSwap(el,which){
  70.  
  71.   el.src=el.getAttribute(which || "origsrc");
  72. }
  73.  
  74. function SimpleSwapSetup(){
  75.   var x = document.getElementsByTagName("img");
  76.   for (var i=0;i<x.length;i++){
  77.     var oversrc = x[i].getAttribute("oversrc");
  78.     if (!oversrc) continue;
  79.      
  80.     // preload image
  81.     // comment the next two lines to disable image pre-loading
  82.     x[i].oversrc_img = new Image();
  83.     x[i].oversrc_img.src=oversrc;
  84.     // set event handlers
  85.     x[i].onmouseover = new Function("SimpleSwap(this,'oversrc');");
  86.     x[i].onmouseout = new Function("SimpleSwap(this);");
  87.     // save original src
  88.     x[i].setAttribute("origsrc",x[i].src);
  89.   }
  90. }
  91.  
  92. </script>
  93. <?php get_footer(''); ?>
  94. </div>
  95. <!-- content-notepad --></div>
  96. <!-- end lead-content --></div>  
  97. <!-- end .lead-content-wrapper --></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement