hi guys. My blog is laid out so there are two columns on the main page (http://www.theangrywalrus.com/blog). What I would like to do is to edit the theme's index page so that on the left hand side, posts from a certain category are excluded from being shown - and then on the right side allow those excluded posts to be shown with a little bit of a change in format - perhaps displaying up to 5 or so in a column (but that's for later). If you don't understand what I'm saying, try clicking the link to get a mental picture.
Okay, the index page is here:
<?php get_header(); ?>
<div id="primary" class="twocol-stories">
<div class="inside">
<?php
// Here is the call to only make two posts show up on the homepage REGARDLESS of your options in the control panel
query_posts('showposts=2');
?>
<?php if (have_posts()) : ?>
<?php $first = true; ?>
<?php while (have_posts()) : the_post(); ?>
<div class="story<?php if($first == true) echo " first" ?>">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
<div class="details">
Posted by <?php the_author_posts_link() ?> on <?php the_time('M d Y');?> |
<?php the_category(', ') ?> <?php edit_post_link('Edit this', '', ''); ?>
</div>
<?php the_excerpt() ?>
<div class="details">
<?php comments_popup_link('no comments', '1 comment', '% comments'); ?> for now | <span class="read-on"><a href="<?php the_permalink() ?>">read on</a></span>
</div>
</div>
<?php if($first==true) { $first= false;} else {echo '<div class="clear"></div>';$first= true; } ?>
<?php endwhile; ?>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
<div class="clear"></div>
</div>
</div>
<!-- [END] #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
I can see plainly that there is a loop that displays all the posts possible - so I would assume that I need to ditch the loop first. From there though, I don't really know how exactly to exclude posts based on category from being displayed. Any help would be nice.