Hi There,
You can try to add the following code snippets to your functions.php
Function to disable the cookie info bar:
add_action('moove_gdpr_inline_styles','moove_extend_gdpr_styles',10,3);
function moove_extend_gdpr_styles( $styles, $primary, $secondary ) {
$styles .= '#moove_gdpr_cookie_info_bar { display: none; }';
return $styles;
}
Function to display the popup if the cookies does NOT exists:
function gdpr_js_extension() {
ob_start();
?>
<script>
jQuery(document).ready(function(){
if ( ! document.cookie.match(/^(.*;)?\s*moove_gdpr_popup\s*=\s*[^;]+(.*)?$/) ) {
setTimeout(function(){
var modal_instance = lity('#moove_gdpr_cookie_modal');
}, 500);
}
});
</script>
<?php
echo ob_get_clean();
}
add_action( 'wp_footer', 'gdpr_js_extension', 1000 );
I hope this works.
-
This reply was modified 6 years, 9 months ago by
MA.