April 30, 2009

Show latest posts in the sidebar

Okay, this is a super simple thing to do, and may be not worth posting, but if you are working on a theme yourself, this is something that is an essential addition to your sidebar.php file, and makes it easier for the user if they don’t want to mess around with widgets too much. You can also use this in your index.php file or footer.php file if you’re going for some pretty innovative things.

<?php wp_get_archives('type=postbypost&limit=4'); ?>

Voila! Doesn’t get much easier than that does it?

Previous Post and Next Post

Try HostGator Webhosting for 1 cent for the 1st Month Click here and enter "wordpress"

Leave a reply

* means field is required.