I'm using a script so I can write out the 3 latest headings from my blog under a post. But I don't want it to show the post you currently read, somehow I don't get that to work.
This is my current code i'm going with:
<div id="latest"> <ol> <?php $lastposts = get_posts('numberposts=3'); foreach($lastposts as $post) : setup_postdata($post);?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> </ol> </div>
Thanks in advance