code to display categories on home page