Play in twisted tree sporting something on your head (6)
I believe the answer is:
hamlet
'play' is the definition.
(play by William Shakespeare)
I don't understand how the remainder of the clue works.
Can you help me to learn more?
(Other definitions for hamlet that I've seen before include "Shak. play; village" , "Small village for Shakespeare prince" , "Danish role" , "The Dane" , "whose forefathers were rude, did Gray imply?" .)