<!-- HTML-->
<div id="avisocookie" style="display: none;">
<div class="linea">
<p>YOUR MESSAGE HERE</p>
<a href="javascript:void(0);" class="button" onclick="PonerCookie();"><b>OK</b></a> ? ?
<a href="YOUR TERMS LINK POLICY HERE" target="_blank" class="button">Read More</a>
</div>
</div>
<!-- JAVASCRIPT-->
<script>
function getCookie(c_name){
var c_value = document.cookie;
var c_start = c_value.indexOf(" " + c_name + "=");
if (c_start == -1){
c_start = c_value.indexOf(c_name + "=");
}
if (c_start == -1){
c_value = null;
}else{
c_start = c_value.indexOf("=", c_start) + 1;
var c_end = c_value.indexOf(";", c_start);
if (c_end == -1){
c_end = c_value.length;
}
c_value = unescape(c_value.substring(c_start,c_end));
}
return c_value;
}
function setCookie(c_name,value,exdays){
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()) + "; path=/";
document.cookie=c_name + "=" + c_value;
}
if(getCookie('aviso')!="1"){
document.getElementById("avisocookie").style.display="block";
}
function PonerCookie(){
setCookie('aviso','1',365);
document.getElementById("avisocookie").style.display="none";
}
</script>
<!--//FIN BLOQUE COOKIES-->
You need to write CSS code accroding with your theme.
Mine is:
#avisocookie{
display:none;
position:fixed;
left:0px;
right:0px;
bottom:0px;
width:100%;
text-align:center;
min-height:185px;
background-color: rgba(85, 85, 85, 0.8);
color:#fff;
z-index:99999;
}
.linea {
width:100%;
position:absolute;
padding:3%;
font-size:16px;
}