Added a before filter for posts