All pastes #773040 Raw Edit

Thad Allender index.php

public php v1 · immutable
·published 2007-11-14 06:21 UTC
rendered paste body
<?php get_header(); ?><?php/*This version of the front page template forhttp://thadallender.com/provides the latest post in the Feature categoryfor the Main Feature section.*/// Feature category query --  displayed later in template$feature_cat = 1; // set to the Feature category ID #$main_query = new WP_Query("showposts=1&cat=$feature_cat");$categories = wp_get_object_terms($post->ID, 'category');foreach( $categories as $category ) {	if ( $category->term_id != $feature_cat ) {		$cat_offset = $category->term_id;		break;	}}?><hr><!--BEGIN TOP THREE-->		<a name="content"></a>		<div class="column span-7 colborder">		  <h6><?php wp_list_categories('include=2&title_li=&style=none'); ?></h6><hr><?php$offset = 0;if ( 2 == $cat_offset ) {	$offset = 1;}query_posts("showposts=1&cat=2&offset=$offset");?>    <?php while (have_posts()) : the_post(); ?>    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" /></a>        <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></a></h4>    <?php the_excerpt(); ?>    <p class="small"><?php the_time('F jS, Y') ?> | <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>    <?php endwhile; ?>		</div>		<div class="column span-7 colborder">		  <h6><?php wp_list_categories('include=3&title_li=&style=none'); ?></h6><hr><?php$offset = 0;if ( 3 == $cat_offset ) {	$offset = 1;}query_posts("showposts=1&cat=3&offset=$offset");?>    <?php while (have_posts()) : the_post(); ?>    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" /></a>        <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></a></h4>    <?php the_excerpt(); ?>       <p class="small"><?php the_time('F jS, Y') ?> | <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>    <?php endwhile; ?>		</div>				<div class="column span-8 last">		 <h6><?php wp_list_categories('include=7&title_li=&style=none'); ?></h6><hr><?php$offset = 0;if ( 7 == $cat_offset ) {	$offset = 1;}query_posts("showposts=1&cat=7&offset=$offset");?>    <?php while (have_posts()) : the_post(); ?>    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" /></a>        <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></a></h4>    <?php the_excerpt(); ?>        <p class="small"><?php the_time('F jS, Y') ?> | <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>    <?php endwhile; ?>		</div>		<hr><!--END TOP THREE--><div class="column span-15 colborder">			<!--BEGIN FEATURE--><!--<h3>Feature</h3>--><h3><?php wp_list_categories('include='  . $feature_cat . '&title_li=&style=none'); ?></h3><hr><?php if ($main_query->have_posts()) : ?><br /><?php while ($main_query->have_posts()) : $main_query->the_post(); ?>    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php $key="photo"; echo get_post_meta($post->ID, $key, true); ?>" /></a>        <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></a></h4>    <?php the_excerpt(); ?>        <p class="small"><?php the_time('F jS, Y') ?> | <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>    <?php endwhile; ?><?php else : ?> <h2 class="center">Not Found</h2> <p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?></p><?php endif; ?><!--END FEATURE--><hr><div class="column span-7 colborder"><h6><?php wp_list_categories('include=4&title_li=&style=none'); ?></h6><hr><?php$offset = 0;if ( 7 == $cat_offset ) {	$offset = 1;}query_posts("showposts=1&cat=4&offset=$offset");?>    <?php while (have_posts()) : the_post(); ?>    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" /></a>        <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></a></h4>    <?php the_excerpt(); ?>     <p class="small"><?php the_time('F jS, Y') ?> | <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>    <?php endwhile; ?></div><div class="column span-7 last"><h6><?php wp_list_categories('include=6&title_li=&style=none'); ?></h6><hr><?php$offset = 0;if ( 6 == $cat_offset ) {	$offset = 1;}query_posts("showposts=1&cat=6&offset=$offset");?>    <?php while (have_posts()) : the_post(); ?>    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" /></a>        <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></a></h4>    <?php the_excerpt(); ?>        <p class="small"><?php the_time('F jS, Y') ?> | <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>    <?php endwhile; ?></div></div>	<?php include (TEMPLATEPATH . '/second.php'); ?>	<?php include (TEMPLATEPATH . '/third.php'); ?><?php get_footer(); ?>