• Hello! I’m trying to create a homepage template with recent posts on a side and the page’s post. I’m not using a plugin because I want to customize the recent posts.. here’s the code

    <div id="home_left">
         <ul>
        <?php query_posts('showposts=5'); ?>
    
        <?php while (have_posts()) : the_post(); ?>
        <li><?php the_post_thumbnail( 'recent_posts' ); ?>
    <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
    
        <li><?php echo substr(get_the_excerpt(), 0,80); ?>...</li>
        <?php endwhile;?>
        </ul>
    </div>
    
    <div id="home_post">
    
      <?php the_content(__('Read more'));?>	
    
    </div>

    <?php the_content(__(‘Read more’));?>

    appears to display another post. Is there a way to display just what I have in my homepage post?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Recent posts and page post – on same page’ is closed to new replies.