Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 5th, 2010  |  syntax: PHP  |  size: 3.37 KB  |  hits: 80  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /*
  3. Template Name: Snarfer
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7.  
  8. <div id="columns">
  9.   <div id="centercol">
  10.     <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  11.     <div class="box post full" id="post-<?php the_ID(); ?>">
  12.       <div class="post-block">
  13.         <div class="post-title">
  14.           <h1>
  15.             <?php the_title(); ?>
  16.           </h1>
  17.         </div>
  18.       </div>
  19.       <div class="content">
  20.         <!--/post-title -->
  21.         <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
  22.         <!--/post-excerpt -->
  23.       </div>
  24.       <!--/content -->
  25.     </div>
  26.     <!--/box -->
  27.     <?php endwhile; endif; ?>
  28.   </div>
  29.   <div id="centercol">
  30.     <?php rewind_posts(); ?>
  31.         <?php
  32.         //the query
  33.         query_posts('category_name=Front Page Featured&showposts=4'); ?>
  34.     <?php if (have_posts()) : ?>
  35.     <?php $counter = 1;?>
  36.     <?php while (have_posts()) : the_post(); ?>
  37.         <h1>Featured Posts</h1>
  38.     <div class="box post" id="post-<?php the_ID(); ?>">
  39.       <div class="content">
  40.         <div class="post-title">
  41.           <div class="post-date"><a href="<?php the_permalink(); ?>">
  42.             <?php the_time('d'); ?>
  43.             </a> <span>
  44.             <?php the_time('M'); ?>
  45.             <br />
  46.             <?php the_time('Y'); ?>
  47.             </span></div>
  48.           <!--/post-date -->
  49.           <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
  50.             <?php the_title(); ?>
  51.             </a></h2>
  52.         </div>
  53.         <!--/post-title -->
  54.         <div class="clr"></div>
  55.         <div class="social-links">
  56.           <div style="float:left;">In
  57.             <?php the_category(', ') ?>
  58.             , by
  59.             <?php the_author_posts_link(); ?>
  60.           </div>
  61.           <div class="post-commets">
  62.             <?php _e('Comments'); ?>
  63.             <a href="<?php the_permalink(); ?>" title="View <?php _e('Comments'); ?>" class="font-sm">(
  64.             <?php comments_number(0, 1, '%'); ?>
  65.             )</a></div>
  66.           <!--/post-commets -->
  67.           <div class="clr"></div>
  68.         </div>
  69.         <!--/social-links -->
  70.         <?php $postimageurl = get_post_meta($post->ID, 'post-img', true); if ($postimageurl) { ?>
  71.         <div class="pic"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php echo $postimageurl; ?>" alt="<?php the_title_attribute(); ?>" /></a></div>
  72.         <?php } ?>
  73.         <!--/post-img -->
  74.         <div class="post-excerpt">
  75.           <?php the_excerpt(); ?>
  76.           <p><span>
  77.             <?php _e('Leave Your'); ?>
  78.             <a href="<?php the_permalink(); ?>">
  79.             <?php _e('Comments'); ?>
  80.             </a> &raquo;</span></p>
  81.         </div>
  82.         <!--/post-excerpt -->
  83.         <div class="clr"></div>
  84.       </div>
  85.       <!--/content -->
  86.     </div>
  87.     <!--/box -->
  88.     <?php if ($counter%2==0) { ?>
  89.     <div class="clr"></div>
  90.         <?php } $counter++; ?>
  91.     <?php endwhile; ?>
  92.     <?php else : ?>
  93.     <div class="box post">
  94.       <div class="content">
  95.         <div class="post-title">
  96.           <h1>No Posts Were Found</h1>
  97.         </div>
  98.       </div>
  99.     </div>
  100.     <?php endif; ?>
  101.   </div>
  102.   <!--/centercol -->
  103.   <?php get_sidebar(); ?>
  104.   <div class="clr"></div>
  105. </div>
  106. <!--/columns -->
  107. <?php get_footer(); ?>