Mr. Trump understands that attacking the media is the reddest of meat for his base, which has been conditioned to reject reporting from news sites outside of the conservative media ecosystem.