Short answer: You don't.
Headers and footers are in a different story or layer than the body of the document. You should not be able to select even one thing in a header or footer with Ctrl+A when you are in the body of a document.
It is likely more complex than you have imagined.
Header/Footer Settings Recap
What is it you are trying to accomplish when you do this?
I or someone else here may be able to help you accomplish that.