Light of all wavelengths can be absorbed and converted to heat. Red light absorbed by the chloropyll in the plants, most wavelengths absorbed by dark soil,black plastic, etc.. These warm the air, but also radiate in the infrared at wavelengths characteristic of temperature and in proportion to the emissivity of the material. These longer wavlengths often are not well transmitted by the glasses, so their heat energy is trapped in the greenhouse. Transmission of IR wavelengths of 10µ or so require exotic materials like zinc sulfide, salt, etc.
But consider a “thought experiment” if you will. Suppose I am a moeclue of H20 vapor in the atmosphere. I am “seeing” IR coming primarily from one source, the sun but I radiate what I have received in all directions. I warm up some and through convection I warm the gasses around me. There is my “cousin” who is at a lower altitude than I and he sees somewhat less IR than I because of what I have absorbed before it got to him but what he does receive he raditates and also through convection warms symmetrically in all directions. All these molecules also recieve reflected IR from the surface and all of that is proportionately reduced on the way up as it was on the way down. This process is repeated infinitely (almost) and so as these molecules all radiate and convey heat symmetrically, how is it they “trap” anything? There is a gradient of IR aborption on the way down from the sun and a smaller one in the opposite direction on the way up but just where is the “trapping”?