NOT YET FINISHED.
(updated get_all_posts function)