Link to a theme involves witch’s crossing close to midnight (7)
I believe the answer is:
hashtag
'link to a theme' is the definition.
(social media link to other posts on a topic)
'involves witch's crossing close to midnight' is the wordplay.
'involves' becomes 'has'.
'witch' becomes 'hag' (synonyms).
'crossing' indicates putting letters inside.
'close to' says to take the final letters (the close/ending of).
The final letter of 'midnight' is 't'.
'hag' enclosing 't' is 'htag'.
'has'+'htag'='HASHTAG'
(Other definitions for hashtag that I've seen before include "Twitter mark" , "Label on a Twitter post" , "Social media identifier" , "Word or phrase to aid online searches - hag's hat (anag)" , "Symbol used to indicate the subject of a Twitter message" .)