Made theme work with custom post types