Did you add that code inside a <script></script>
tag?
Also, window.cookieconsent_options
isn’t a standard property of window
? Is there also a script or plugin somewhere that acts on these options?
Maybe it got disabled because I tried to customize the header.php from my child theme, and went back to default for the header.php of my parent theme.
So this is the beginning of my file header.php in my child theme with the integration I made, if you want to have a look:
?<?php
$options = thrive_get_options_for_post();
$enable_fb_comments = thrive_get_theme_options( “enable_fb_comments” );
$fb_app_id = thrive_get_theme_options( “fb_app_id” );
$logo_pos_class = ( $options[‘logo_position’] != “top” ) ? “side_logo” : “center_logo”;
$float_menu_attr = “”;
if ( $options[‘navigation_type’] == “float” || $options[‘navigation_type’] == “scroll” ) {
$float_menu_attr = ( $options[‘navigation_type’] == “float” ) ? ” data-float=’float-fixed'” : ” data-float=’float-scroll'”;
}
?><!DOCTYPE html>
<?php tha_html_before(); ?>
<html <?php language_attributes() ?>>
<head>
<!– Begin Cookie Consent plugin by Silktide – https://silktide.com/cookieconsent –>
<script type=”text/javascript”>
window.cookieconsent_options = {“message”:”Ce site utilise des cookies pour vous garantir la meilleure expérience.”,”dismiss”:”OK”,”learnMore”:”En savoir plus”,”link”:”https://osezrealiservosreves.com/mentions-legales/”,”theme”:”dark-bottom”};
</script>
<script type=”text/javascript” src=”//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.10/cookieconsent.min.js”></script>
<!– End Cookie Consent plugin –>
<?php tha_head_top(); ?>
<title>
<?php wp_title( ” ); ?>
No scripts for just EU
]]>But I can see it on Google Chrome and opera
]]>FWIW, the cookie notice appears fine to me on Chrome for both mobile and desktop. It’s a full width overlay along the bottom of the screen, so it takes on what ever the window width is. As much as we would like to help, it’s very difficult to resolve issues that we cannot replicate.
Maybe try disabling all of your browser extensions and see if that changes how things look on your end?
]]>