- This topic has 7 replies, 2 voices, and was last updated 1 year, 6 months ago by Leo.
April 28, 2019 at 7:52 am #882331Kathy
Can I hard code the code below in files on the server such as in the header.php? I do not understand how to create Elements to replace my homepage image with a video. The instructions are not clear to me on what to add in Elements to make this work. What do I put in the “Your Element content in here” code below? – I am totally lost on how to do something this simple in the theme.
I cannot share a link because I am using the Stagging plugin to rework a website.
<video loop muted autoplay poster=”https://MY-WEBSITE-LINK.org/video/NH-cathedral-labyrinth.jpg” class=”background-video”>
<source src=”https://MY-WEBSITE-LINK.org/video/Woods.mp4.webm” type=”video/webm”>
</video>Your Element content in here.
Can someone PLEASE help me get this working??
Thank you.GeneratePress 2.2.2GP Premium 1.8.1April 28, 2019 at 7:55 am #882335LeoStaffCustomer Support
Try following the instructions here:
The first block of code goes into the Elements content.
The second block of code is CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this helps 🙂April 28, 2019 at 7:59 am #882341Kathy
Thank you Leo for responding so quickly especially on a weekend!
Okay…this is the page I was reading. Do I need to add or change any of the settings in the Elements? Just place the above code (changed of course to my settings) in the content area in Elements? So sorry but I need “baby steps”.April 28, 2019 at 8:02 am #882345LeoStaffCustomer SupportApril 28, 2019 at 8:09 am #882362Kathy
I got this in the top of the Element page when I added my code:
“This element needs a location set within the Display Rules tab in order to display.”
What location do I add in the Display Rules tab?April 28, 2019 at 8:11 am #882363LeoStaffCustomer Support
That would be where you want that header element to be displayed.
Take a look at this:
https://docs.generatepress.com/article/header-element-overview/#display-rulesApril 28, 2019 at 8:21 am #882380Kathy
Okay…here is what I have so far.
Added the code in Elements like this:<video loop muted autoplay poster=”https://MY-SITE.org/video/NH-cathedral-labyrinth.jpg” class=”background-video”>
<source src=”https://MY-SITE.org/video/Woods.mp4.webm” type=”video/webm”>
I added a fall back image in Elements.
I set location to homepage.
I added the css to server child theme stylesheet.
I removed featured image from the actual homepage.
Now I am getting a grayed out block where the video should go.
What do I do now?April 28, 2019 at 1:06 pm #882517
- You must be logged in to reply to this topic.