One of the biggest reasons J. K. Rowling turned the fans of her Harry Potter series into fanatics were—besides from the exceptional characters and rich world building—the clues and hidden secrets that were sprinkled through each book. These things had the fanatic fans searching the stories and analyzing every little detail to try and figure out what they meant.
This kind of engaged audience is what all writers want, right?
The most useful technique is “Discredit the witness”:
A great way to hide a clue is to discredit the one revealing the clue. Discrediting can be done in several ways by, for example, having the clue come from a character that usually speak rubbish and that nobody really takes seriously, having the clue come from a compulsive liar, etc.
Professor Trelawney is probably the biggest target for being discredited in the Harry Potter series. She talks so much nonsense that no one would ever believe she says anything real and true.
For example, in Harry’s first lesson with her in Harry Potter and the Prisoner of Azkaban (Chapter 6) she tells him that he has the sign of the Grim in his teacup, which is the omen of death.
Only pages later, Professor McGonagall discredit Trelawney by mentioning that Trelawney has predicted the death of a student each year since beginning her work at Hogwarts. And so, we decide not to believe anything Trelawney said.
However, the Grim does come. It’s Sirius Black’s Animagus. While it wasn’t true that Harry would die (just yet) Trelawney was correct that the Grimm would come and that it was a symbol of death (Sirius’ own death).
So, by discrediting Trelawney, Rowling could drop many clues in her dialogue and in her background story (how about that prophecy about Harry and Voldemort, huh?) just because Rowling knew the reader wouldn’t believe anything she said.