Support » Fixing WordPress » Show 3 latest headings (but not the most latest)

  • Hey

    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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Show 3 latest headings (but not the most latest)’ is closed to new replies.