KO im trying to put together my very first theme, but I'm having some trouble with the loop. What I would live is for each post to be wrapped in its own DIV so that i can style them according to the category there in. Ive tries to add <div class="post"id="post-">to my post DIV, but all post still end up in once single DIV called "post".
My code is as follows:
<?php get_header(); ?>
<div id="networkcontain">
<div id="networkbar">
</div>
<div id="tphead">
<a href="/"><h1>Cerebral Black Hole</h1></a>
</div>
<div id="containertp">
<div id="contentleft"
<div class="tf_body">
<div class="entryContent">
<div class="post"id="post-<?php the_ID(); ?>">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h2 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></h2>
<div class="date">
<?php the_time('F j, Y'); ?> · <a href="javascript:window.print()">Print This Article</a>
</div>
<?php the_content(__('Read more'));?><div style="clear:both;"></div>
<div class="postmeta">Written by <?php the_author(); ?> · Filed Under <?php the_category(', ') ?> <?php edit_post_link('(Edit)', '', ''); ?>Tagged: <?php the_tags('') ?>
<?php if (function_exists('sharethis_button')) { sharethis_button(); } ?>
</div>
<?php trackback_rdf(); ?>
<?php endwhile; else: ?>
<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php endif; ?>
</div>
</div>
</div>
<?php get_footer(); ?>
<?php get_sidebar(); ?>
Please help as im a bit lost now and dont realy know what is wrong. For an image of what my curent loop is outputting see this link http://www.flickr.com/photos/21455233@N08/2446645235/ as you can see there is no seperation between the posts. This is a mock-up of what I would like the posts to be like when Im done http://www.flickr.com/photos/21455233@N08/2447470364/ see how there formatted acording to the category there in - this is why I want each post to be in its own DIV.
Again please help as I canot continue untill this is sorted out. Many thanks in advance.