Edited answer
Thank you for you clarification above, and please give this a try –
Note – This code assumes that you are using page.php, a variation of the page templage or some other custom template – it will not work on your index page (index.php).
<div id="page-<?php the_ID(); ?>">
<?php
if (have_posts()) : while (have_posts()) : the_post();
if ( has_post_thumbnail() ) :
the_post_thumbnail('thumbs');
endif;
echo get_the_date('jS F Y');
the_title();
the_content();
endwhile;
endif;
?>
</div>
<?php
/** Query the list of posts to display */
$args = array(
'post_type' => 'post',
'post_status' => 'publish'
);
$posts_query = new WP_Query($args);
?>
<div id="post-list">
<?php
if($posts_query->have_posts()) : while ($posts_query->have_posts()) : $posts_query->the_post();
?>
<div id="<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="post-title">
<a href="<?php the_permalink(); ?>" title="View post '<?php the_title_attribute(); ?>'">
<?php the_title(); ?>
</a>
</h1>
<p class="post-content">
<?php echo substr(get_the_excerpt(), 0,200); ?>
</p>
</div>
<?php
endwhile;
wp_reset_postdata();
endif;
?>
</div>
Before/after the main Loop you have no need of the wp_reset_postdata()
and wp_reset_query()
fucntions at all.
However, after the secondary Loop to list the posts, just before the final endif;
you’ll need just wp_reset_postdata()
.
You’ll see that I’ve added some HTML in the secondary Loop to give you an idea of how to do this – obviously you’ll need to do somehting similar to the primary Loop so that you can apply styling.