
Untitled
By: a guest on
Aug 5th, 2010 | syntax:
PHP | size: 3.37 KB | hits: 80 | expires: Never
<?php
/*
Template Name: Snarfer
*/
?>
<?php get_header(); ?>
<div id="columns">
<div id="centercol">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="box post full" id="post-<?php the_ID(); ?>">
<div class="post-block">
<div class="post-title">
<h1>
<?php the_title(); ?>
</h1>
</div>
</div>
<div class="content">
<!--/post-title -->
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<!--/post-excerpt -->
</div>
<!--/content -->
</div>
<!--/box -->
<?php endwhile; endif; ?>
</div>
<div id="centercol">
<?php rewind_posts(); ?>
<?php
//the query
query_posts('category_name=Front Page Featured&showposts=4'); ?>
<?php if (have_posts()) : ?>
<?php $counter = 1;?>
<?php while (have_posts()) : the_post(); ?>
<h1>Featured Posts</h1>
<div class="box post" id="post-<?php the_ID(); ?>">
<div class="content">
<div class="post-title">
<div class="post-date"><a href="<?php the_permalink(); ?>">
<?php the_time('d'); ?>
</a> <span>
<?php the_time('M'); ?>
<br />
<?php the_time('Y'); ?>
</span></div>
<!--/post-date -->
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a></h2>
</div>
<!--/post-title -->
<div class="clr"></div>
<div class="social-links">
<div style="float:left;">In
<?php the_category(', ') ?>
, by
<?php the_author_posts_link(); ?>
</div>
<div class="post-commets">
<?php _e('Comments'); ?>
<a href="<?php the_permalink(); ?>" title="View <?php _e('Comments'); ?>" class="font-sm">(
<?php comments_number(0, 1, '%'); ?>
)</a></div>
<!--/post-commets -->
<div class="clr"></div>
</div>
<!--/social-links -->
<?php $postimageurl = get_post_meta($post->ID, 'post-img', true); if ($postimageurl) { ?>
<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>
<?php } ?>
<!--/post-img -->
<div class="post-excerpt">
<?php the_excerpt(); ?>
<p><span>
<?php _e('Leave Your'); ?>
<a href="<?php the_permalink(); ?>">
<?php _e('Comments'); ?>
</a> »</span></p>
</div>
<!--/post-excerpt -->
<div class="clr"></div>
</div>
<!--/content -->
</div>
<!--/box -->
<?php if ($counter%2==0) { ?>
<div class="clr"></div>
<?php } $counter++; ?>
<?php endwhile; ?>
<?php else : ?>
<div class="box post">
<div class="content">
<div class="post-title">
<h1>No Posts Were Found</h1>
</div>
</div>
</div>
<?php endif; ?>
</div>
<!--/centercol -->
<?php get_sidebar(); ?>
<div class="clr"></div>
</div>
<!--/columns -->
<?php get_footer(); ?>