Hi everyone,
I'm currently using the structured theme (white). On the page there are two sections, a top and bottom both of which unfortunately show the same post with a picture associated with the post.
How can I make it so that the top half displays the latest post, and the bottom half displays the post previous to the latest one?
Here's the code for my home.php in the theme folder:
<?php get_header(); ?>
<div id="content">
<div id="homepagetop">
<div class="textbanner">
<?php $recent = new WP_Query("cat=" .st_option('hp_top_cat'). "&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
<h3><a href="http://www.sanshoopla.com/blog/about/" rel="bookmark">Thoughts on current happenings from
an aspiring journalist. </a></h3>
</div>
<div class="featuredimage">
<?php if( get_post_meta($post->ID, "featured", true) ): ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "featured", true); ?>" alt="<?php the_title(); ?>" /></a>
<?php else: ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/images/default_featured.jpg" alt="<?php the_title(); ?>" /></a>
<?php endif; ?>
<?php endwhile; ?>
</div>
<div class="homewidgets">
<ul>
<h4><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4>
<?php the_content_limit(480, ""); ?>
</ul>
</div>
</div>
<div id="homepage">
<?php include(TEMPLATEPATH."/sidebar_left.php");?>
<div class="homepagemid">
<h3><!--<?php echo cat_id_to_name(st_option('hp_mid_cat')); ?>--></h3>
<?php $recent = new WP_Query("cat=" .st_option('hp_mid_cat'). "&showposts=" .st_option('hp_mid_num') ); while($recent->have_posts()) : $recent->the_post();?>
<div class="homepagethumb">
<?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
<?php else: ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/images/default_thumbnail.jpg" alt="<?php the_title(); ?>" /></a>
<?php endif; ?>
</div>
<div class="homepagecontent">
<h4><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4>
<?php the_content_limit(480, ""); ?>
</div>
<?php endwhile; ?>
</div>
<?php include(TEMPLATEPATH."/sidebar_right.php");?>
</div>
</div>
<!-- The main column ends -->
<?php get_footer(); ?>