Hi.. First of all, sorry for my bad english.
I want to display the post_thumbnail on the homepage by floating it to the left, while the title, meta, content, etc are floated to the right. Here's the image for example. And here's my function for the index section:
function thumb_index_loop(){
while ( have_posts() ) : the_post() // Start the loop:
// This is just what we decide to show in each post ?>
<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
<?php if ( has_post_thumbnail()) { ?>
<div class="pic fl"><!--floating thumbnail to the left-->
<a>">
<?php the_post_thumbnail(); ?></a>
</div>
<?php } ?>
<div class="postfloater"><!--floating post elements to the right-->
<?php thematic_postheader(); ?>
<div class="entry-content">
<?php the_excerpt(); ?>
</div>
<?php thematic_postfooter(); ?>
</div><!--postfloater-->
<div class="clear"></div>
</div><!-- .post -->
<?php
endwhile; // loop done, go back up
}
add_action('thematic_indexloop', 'thumb_index_loop');
The problem is, when the post didn't have a thumbnail, the post elements still floated to the right. So what i want to do is make a conditional function that floated the post elements to the right when the post has a thumbnail, and show the post elements without the floater div when it didn't have a thumbnail.
I always end up with syntax error, by doing trial and error with the conditional function (php if, else, etc..)
Any ideas?