index load_post function improved