Added meta data to custom posts and related fixes