Pre refactor to use JS for displaying posts