An optical propagation simulation is carried out for the study of photonic defect modes in a stacked structure of cholesteric liquid crystal films with spatially varying pitch. The defects are introduced by a pitch jump and a phase jump in the cholesteric helix. The effect of a finite sample thickness on transmission of the defect mode and on the required polarization of incident light to create the defect mode is discussed. For normal and near-normal incidence of circularly polarized light with the same handedness as structure, the defect caused by a pitch jump results in discrete peaks within a forbidden band in the transmission. The particular spectrum is similar to the feature of a Fabry-Pérot interferometer. By introducing an additional phase jump, linear blueshifts of the defect modes in transmission spectra are correlated with an increase in the twist angle.