Selective polarization generation in photonic crystal with a polarizer is proposed. Polarizer is a nanocomposite with metallic elongated nanoparticles. Optical characteristics of a polarizer are defined by the nanoparticles’ shape. The mode discrimination at generation is achieved via the polarizer's absorption. Absorption depends on mutual orientation of anisotropy and polarization axes.