From Whiki, i see that only aldehyde or ketone have reactions with 2,4-dinitrophenylhydrazine.
It explains the inactivity of carboxylic acids, amides, and esters by resonance.
How about acid chloride and acid anhydride? They seem not to be resonance stabilized.