{"id":2491,"date":"2021-11-13T16:52:46","date_gmt":"2021-11-13T15:52:46","guid":{"rendered":"https:\/\/digitalia.culturanuova.net\/blog\/?p=2491"},"modified":"2021-11-13T16:52:46","modified_gmt":"2021-11-13T15:52:46","slug":"open-source-cookie-bar-solution","status":"publish","type":"post","link":"https:\/\/digitalia.culturanuova.net\/blog\/?p=2491","title":{"rendered":"open-source cookie-bar solution"},"content":{"rendered":"\n<p>I found this very interesting and simple script: <a href=\"https:\/\/openbase.com\/js\/cookie-bar\/documentation\">cookie-bar<\/a>, customizable very easily <a href=\"https:\/\/cookie-bar.eu\/?forceLang=it&amp;theme=altblack&amp;customize=1&amp;always=1&amp;refreshPage=1&amp;top=1&amp;showNoConsent=1&amp;noConfirm=1&amp;remember=30&amp;privacyPage=https%3A%2F%2Fwww.culturanuova.net%2Fprivacy.php#configuration\">here<\/a>.<\/p>\n\n\n\n<p>Unfortunately I didn&#8217;t manage to save and use that (free) javascript in local. No jquey, no css, a very short code.<\/p>\n\n\n\n<p>The only thing you have to do is personalize the code within you have what you want hide if your visitor refuse your cookies.<\/p>\n\n\n\n<p>The code should be something like the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n if ((isset($_COOKIE&#91;'cookiebar'])))\n    {\n    echo \" &#91;whatever you want\";\n    }\n else\n    {\n    echo \"&lt;div class=\\\"what-you-want\\\">to see this content accept our cookie policy.&lt;\/div>\";\n    }\n?>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I found this very interesting and simple script: cookie-bar, customizable very easily here. Unfortunately I didn&#8217;t manage to save and use that (free) javascript in local. No jquey, no css, a very short code. The only thing you have to do is personalize the code within you have what you want hide if your visitor &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/digitalia.culturanuova.net\/blog\/?p=2491\" class=\"more-link\">Leggi tutto<span class=\"screen-reader-text\"> &#8220;open-source cookie-bar solution&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[566],"tags":[445,446,710],"class_list":["post-2491","post","type-post","status-publish","format-standard","hentry","category-webmaster","tag-cookie-law","tag-cookies","tag-cookies-banner"],"_links":{"self":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2491"}],"version-history":[{"count":1,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2491\/revisions"}],"predecessor-version":[{"id":2492,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2491\/revisions\/2492"}],"wp:attachment":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}