Plugin Author
Phil
(@philsbury)
Hi @whangsta,
There’s some issues with elementor and age gate and elementor needs the_content and age gate doesn’t use it. But as it seems to be rendering ok, not sure that’ll be the issue.
I’m not entirely sure to be honest though what else it could be. When I load the page and it breaks, the content structure is different to when it works. IN both cases, age gate has already done it’s thing and isn’t doing anything anymore.
If elementor is saving some stuff though on each render, the lack of the_content might be causing the problem. Here’s what I’d try to fix it, but like I say, stab in the dark here! We’ll try to trick elementor into behaving
// this could be any filter or action really for age gate
add_filter('age_gate_before', function($in){
// well call the_content into an output buffer to see
// if the filters on it sorts out elementor
ob_start();
the_content();
ob_get_clean();
// return whatever was passed in
return $in;
}
I’m not convinced this will help as a lot of elementor seems to be JS driven, but it’s worth a shot.
There is a JS event called agegatepassed, if you’re able to reset all the animations when that fires, it could be an option too.
Let me know if any of those things work
Thanks
Phil
Thanks for taking the time and for the thorough response! Quick follow up question, do I add that snippet in functions.php?
And again, if this will require further investigating I’m willing to pay for your time with the support. Please let me know if that interests you. Thanks!
Plugin Author
Phil
(@philsbury)
Hi @whangsta,
Yeah in the functions.php is fine.
I’m happy to support, don’t think we can promote paid services on here, but supporting the community benefits the plugin as it gives ideas for future releases.
I also saw your slack message, but I can’t remember my log in. If I sort that then I’ll ping you on there.
Cheers
Phil
Thanks Phil I added it to functions.php but that didn’t seem to do the trick. Any other solutions? I’ll be on slack as well. Thanks 🙂
Plugin Author
Phil
(@philsbury)
Hi @whangsta,
More for anyone coming across this, but as we talked about one slack, the trick here is to reset the animations when age gate gets passed in JS mode.
So, with js enabled, add this plugin (or port the javascript into an existing file) and everything should be good.
https://www.dropbox.com/s/znnjqkjjkeftlki/age-gate-elementor-reset.zip?dl=1
Cheers
Phil