Warning: mysqli_query(): (HY000/1030): Got error 28 from storage engine in /home/wpthemes/public_html/wp-includes/wp-db.php on line 1877
Show latest posts in the sidebar | WPThemes.com - WordPress Themes
Warning: mysqli_query(): (HY000/1030): Got error 28 from storage engine in /home/wpthemes/public_html/wp-includes/wp-db.php on line 1877

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.

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

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.

*

*