How to display an incrementing number next to each published post

DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

Ever wished to be able to automatically number your posts (Like Article 1, Article 2, and so on) like sites such as A List Apart are doing? If yes, just read this recipe which will show you how to do it easily.

The first thing to do is to paste the function into your functions.php file: