Add getting of posts function.