Recently, I started creating websites from scratch and I encountered a problem that I could use some help with. The issue is when I have a YouTube video embedded in a post, but I want to showcase the video in the header section of that specific post URL without manually adding the code to the header.
The concept is to have the YouTube video embed code within the post, but display it as a looped background video in the header without directly inserting the code into the header. Instead, I want to render it from the post to the header so that every post page has a header with an embedded video playing in the background.
I am unsure of how to display this data in the header rather than inside the post where the information currently resides. I have come across the html data tag "data:post-header," but I do not have much knowledge about it. Any help or solution on how to render the data in this way would be greatly appreciated.
Thank you in advance! Additionally, any information on the data tag would be very beneficial!