Displaying one post on static front page

  • Author
  • #380242

    Hi everyone,

    I am currently developing a site where I have 3 columns with two being static content and the last displaying a snippet of the latest post. I am developing locally but cannot get the post snippet to show. The two static columns show fine and I am really tearing my hair out figuring out why. Despite searching the forum I have not yet found the answer but am sorry if I am being a bit thick in any respect. My code so far is:

    <?php if(have_posts()) : ?>
    	<div id='front_content'>
    		<?php while(have_posts()) : the_post(); ?> 
    		<?php the_content(); ?>
    	<?php endwhile; ?>
    		$recentBlog = new WP_Query();
    		while($recentBlog->have_posts()) : $recentBlog->the_post();
    	<div class="front_columns">
    		<h2><?php the_title(); ?></h2>
    		<p><?php the_content_rss('read more', false, ' ' , 35); ?></p>
    		<span><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">read more &hellip;</a></span>
    	</div><!-- end front_columns-->
        <br class="dirtyLittleTrick" />
    	<?php endwhile; ?>
    	<?php else: ?>
    	<h2>Sorry we couldn't find  what you were looking for</h2>
    <?php endif; ?>

    If there is anymore information needed I will check back shortly. Much thanks in advance, being a bit of a newbe to WordPress I’m sure the answer is obvious to most.
    Many Thanks



    Afraid you are in the wrong forum. We can’t touch the php here; you need to be over at WordPress.ORG instead for answers that will apply to your blog.

The topic ‘Displaying one post on static front page’ is closed to new replies.