I think the best way would be to create a different page template instead.
Thread Starter
robhav
(@robhav)
Great have done that. Have also added code to show the last ten posts. I can’t seem to find any info however on adding a summary of each post underneath the titles?
<ul><?php $myposts = get_posts('numberposts=10');
foreach($myposts as $post) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?></ul>
How about <?php the_excerpt(); ?>
?
Thread Starter
robhav
(@robhav)
That seems to just display the current page text.
So I get:
– News Title 1
Current Page Text
– News Title 2
Current Page Text
I need to be able to display the excerpts of the particular news stories.
i.e.
– News Title 1
News 1 Text Excerpt
– News Title 2
News 2 Text Excerpt
Thanks again for your replies by the way… appreciate it.
You can use the setup_postdata(); function to setup all the necessary variables… like this:
<ul><?php $myposts = &get_posts('numberposts=10');
foreach($myposts as $post) :
setup_postdata($post);
?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<br /><?php the_excerpt(); ?>
</li>
<?php endforeach; ?></ul>