Setting up all the essential functions

ref:
http://wordpress.stackexchange.com/questions/5955/category-listing-with-thumbnail-and-description-on-home-page/6817#6817