Why is Trump still attacking the free press?

Because the press is free to tell the truth. And the truth hurts Trump's political agenda of accumulating as much personal power as possible.

Example: Trump does not intend to replace Nielsen as head of DHS. Why? Because he, Trump, can now call the shots (maybe literally) personally. Thus, instead of replacing the DHS head after his dismissal, he has a lackey substitute as an interim "head".