Skip to content

Instantly share code, notes, and snippets.

@jdevalk
Created October 18, 2011 08:08
Show Gist options
  • Save jdevalk/1294859 to your computer and use it in GitHub Desktop.
Save jdevalk/1294859 to your computer and use it in GitHub Desktop.
New index for Carly
<?php
get_header();
query_posts('posts_per_page=4&cat=-46');
if (have_posts()) :
$first = true;
while ( have_posts() ) : the_post();
if ( $first ) {
?>
<div id="left">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php
if( function_exists( 'wp_get_post_image' ) )
echo wp_get_post_image( 'width=575&css=leftmain&parent_id=' . $post->ID );
?></a>
<div class="strip">
<h1>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?>
</a>
</h1>
<?php the_excerpt(); ?>
</div>
</div>
<div class="clear"></div>
<?php
$first = false;
} else {
?>
<div class="smallerpost">
<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?>
</a>
</h2>
<?php
if ( function_exists( 'wp_get_post_image' ) )
echo wp_get_post_image( 'width=50&css=alignleft&parent_id=' . $post->ID );
the_excerpt( '<span>Read the rest of this entry? &raquo;</span>' );
?>
</div>
<?php
}
endwhile;
else:
?>
<div id="page">
<h1>Not Found</h1>
<p class="center">
EEEK - sorry, but you've stumbled across a page that's been moved or deleted. Instead, try searching for what you're looking for in the bar above.
</p>
</div>
<?php
endif;
get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment