A three-dimensional ordered macroporous CdS/TiO2 film was prepared by the sol-gel method with a colloidal crystal template and S2? ion exchange, and it exhibited high visible light photocatalytic activity for the aqueous degradation of rhodamine B and 4-chlorophenol. The modification with CdS gave visible light absorption by photosensitization and better separation of photo-induced electrons and holes. The ordered macroporous structure gave higher light utilization and faster reactant transport.