I'm trying to find the code I need to add to a sidebar that will pop up the title (with links) of the last four or so posts. I've been wandering around the codex for awhile to no avail. Can anyone point me in the right direction?
I'm trying to find the code I need to add to a sidebar that will pop up the title (with links) of the last four or so posts. I've been wandering around the codex for awhile to no avail. Can anyone point me in the right direction?
One option:
<ul>
<?php wp_get_archives('type=postbypost&limit=4'); ?>
</ul><?php get_archives('postbypost', 5); ?>
Thanks you guys. I'd run into the same question as keress and I ended up using the snippet from apstaganha2 and it worked like a charm.
get_archives was depreciated in WordPress 2.1. Use wp_get_archives instead.
This topic has been closed to new replies.