Need you help with a custom Loop!
-
Hi,
I’m working on a loop for a website.
I want the first post image width to be 100% of the “block” (done!)
Then I want the post title to be underneath, also 100%
Below this I want the rest of the posts to list with the image floating left and the post title floating right (done!)
My problem is I can’t get the first title gets floated right like the
rest of the posts. I want this to be posted below the post image, with a width of 100%Here’s the code:
<?php $postCount = 0; ?> <h1 class="widget-title">LATEST NEWS</h1> <?php query_posts('showposts=25'); ?> <?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>"><?php if($postCount == 0){the_post_thumbnail( 'thumbnail', array("class" => "tumme"));}?> </a> <div> <div style="float:left;width:40%;padding-top: 3px; border-top: 2px solid #920909; "> <?php if($postCount ++){the_post_thumbnail( 'thumbnail', array("class" => "tumme2"));}?> </a> </div> <div style="float:right;width:60%"> <a href="<?php the_permalink() ?>"><?php the_title('<h2 class="jimmy">', '</h2>' ); ?></a> </div> </div> <div style="float:left;width:100%"> <h2 class="jimmy2"><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></H2> </div> <?php $postCount++; ?> <?php endwhile; ?>Can anyone help me out?
Thanks Jimmy
The topic ‘Need you help with a custom Loop!’ is closed to new replies.