Buy me a coffee

(Event Detail) Add Video Banner (Use Not Linked Page)

 

Event Detail Add Video Banner Use Not Linked Page 09 Min

#1. First, you add a Blank Page in Not Linked with Name/URL:

  • Name: Event Video Banner
  • URL: /event-video-banner

Event Detail Add Video Banner Use Not Linked Page 01 Min

Next, edit page > Add a Section > Add a Video Block.

Event Detail Add Video Banner Use Not Linked Page 03 Min

#2. Install this plugin

The plugin will give you some code to add to the Code Injection Header and footer, like this.

Add A Section To Top Of Blog Posts Use Not Linked Page 03 Min

Add A Section To Top Of Blog Posts Use Not Linked Page 04 Min

#3. Add this code to the Event Page Header Code Injection

<div data-wm-plugin="load" data-target="/event-video-banner"></div>

Event Detail Add Video Banner Use Not Linked Page 04 Min

#4. Add this code to the Custom CSS box

div.wm-load-container {
  display: none;
}
body[class*="type-event"].view-item div.wm-load-container {
  display: block !important;
}

Event Detail Add Video Banner Use Not Linked Page 05.1 Min

 

#5. Add this code to the Code Injection – Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
document.addEventListener('wmSectionLoader:loaded', ({detail}) => {
  if (detail.target !== '/event-video-banner') return;
  $('div.wm-load-container').insertBefore('body[class*="type-event"].view-item article>section:first-child');
})
</script>
<style>
.wm-load-container+section {
    padding-top: 0px !important;
}
</style>

 

Event Detail Add Video Banner Use Not Linked Page 08 Min