Thread Starter
hrizvi
(@hrizvi)
Hi @philsbury , please let me know. Client need this.
Thanks and regards,
Hidayat.
Plugin Author
Phil
(@philsbury)
Hi @hrizvi,
This is probably possible with a bit of custom code, I’ll be able to look at an example later but this info should give you a starting point:
https://agegate.io/docs/styling/adding-custom-markup
Essentially, you’ll want to do something like:
add_filter('age_gate_before', 'before_age_gate', 10, 1);
function before_age_gate($before){
$before .= '<div class="video-bg">';
$before .= '<video src="path/to/video.mp4" loop muted autoplay />';
$before .= '</div>';
return $before;
}
Then add some CSS to place it where you want.
Like I say, I’ve not tested this but I’ll have a more in-depth look after work and see what I can find unless you’ve managed it by then.
Cheers
Phil
Thread Starter
hrizvi
(@hrizvi)
Thanks @philsbury, it worked. Only change i did was to replace class “video-bg” with “age-gate-background” in the above function. Just wanna make sure website will still get crawled by search engines?
Plugin Author
Phil
(@philsbury)
Great stuff. Glad it works.
SEO wise, any common bots (Google etc) will bypass the age check. Anything less common can be added as a custom bot in the advanced settings.
Thanks
Phil
Thread Starter
hrizvi
(@hrizvi)
Thanks Phil (@philsbury) I appreciate that.