Update posts.php

Cleaned up some of the initial PHP.