{"id":2075,"date":"2024-07-15T17:00:55","date_gmt":"2024-07-15T15:00:55","guid":{"rendered":"https:\/\/wypo.io\/documentations\/wp-simply-cookie\/faq\/"},"modified":"2024-10-11T10:54:44","modified_gmt":"2024-10-11T08:54:44","slug":"faq","status":"publish","type":"wypo_documentations","link":"https:\/\/wypo.io\/en\/documentations\/wp-simply-cookie\/faq\/","title":{"rendered":"FAQ"},"content":{"rendered":"\n<ul class=\"wp-block-list is-style-important  \">\n<li class=\"\"><strong>How do I open the banner from a link?<\/strong><br>To create a link to open the consent banner, use the anchor: #wpsimplycookie_open.<\/li>\n\n\n\n<li class=\"\"><strong>How do I add an uncategorised cookie?<\/strong><br>To add an uncategorised cookie, please <a href=\"\/en\/contact\/\">let us know<\/a> so that we can take it into consideration in the next version of the plugin.<br>You can add this cookie with PHP code from your theme&#8217;s functions.php file:<\/li>\n<\/ul>\n\n\n    <div class=\"wp-block-habefast-code  \">\n      <header class=\"habefast-code-header\">\n        <div class=\"habefast-code-lang is-lang-php\">\n          PHP        <\/div>\n      <\/header>\n      <textarea\n        class=\"habefast-code-source\"\n        name=\"codemirror-28380936\"\n        id=\"codemirror-28380936\"\n      >if(class_exists(&quot;WP_Simply_Cookie_Utils_CookiesUsed&quot;)){\n\tWP_Simply_Cookie_Utils_CookiesUsed::addCookie(\n\t\t&quot;Cookie name&quot;, \/\/String\n\t\t&quot;Cookie slug&quot;, \/\/String\n\t\t&quot;Purpose of the cookie&quot;, \/\/String\n\t\t&quot;Cookie expiry&quot;, \/\/String\n\t\t&quot;Tool&quot;,\/\/String\n\t\t&quot;http&quot;,\/\/String &#8211; Type of cookie, authorised value: &quot;http&quot;, &quot;localstorage&quot; et &quot;sessionstorage&quot;\n\t\t&quot;US&quot;,\/\/String &#8211; Country of use of the cookie, ISO country code or &quot;&#91;wpsimplycookie-company-country&#93;&quot; if the cookie is not sent to a third-party tool.\n\t\t&quot;marketing&quot;\/\/String &#8211; Cookie category\n\t);\n}<\/textarea>\n      <script>\n        CodeMirror.fromTextArea( document.getElementById('codemirror-28380936'), {\n          mode: {name:'php',startOpen:true},\n          readOnly: true,\n          lineNumbers: true,\n          firstLineNumber: 1,\n          matchBrackets: true,\n          indentUnit: 4,\n          tabSize: 4,\n          lineWrapping: true,\n        } );\n      <\/script>\n    <\/div>\n    \n\n\n<ul class=\"wp-block-list is-style-important  \">\n<li class=\"\"><strong>I manage several sites. Can I copy and paste the settings?<\/strong><br>Yes, you can export the plugin settings from the &#8220;Import \/ Export&#8221; tab of the plugin settings, then import the json file on the new site.<\/li>\n\n\n\n<li class=\"\"><strong>How can I adapt my Google Tag Manager (GTM) container so that it adapts to user consent?<\/strong><br>Nothing. The WP Simply Cookie plugin directly manages the blocking of third-party tools that require consent prior to use.<br>If you have any doubts about a third-party tool, you can <a href=\"\/en\/contact\/\">contact us<\/a>.<\/li>\n\n\n\n<li class=\"\"><strong>Can I use the consent in my plugin or theme?<\/strong><br>In JavaScript, you can check the consent using the following code:<\/li>\n<\/ul>\n\n\n    <div class=\"wp-block-habefast-code  \">\n      <header class=\"habefast-code-header\">\n        <div class=\"habefast-code-lang is-lang-js\">\n          JS        <\/div>\n      <\/header>\n      <textarea\n        class=\"habefast-code-source\"\n        name=\"codemirror-1911313182\"\n        id=\"codemirror-1911313182\"\n      >if (typeof WPSimplyCookieParser == &quot;function&quot;) {\n    if (WPSimplyCookieParser.hasConsent(&quot;functionnal&quot;)) {\n        \/\/ The user has given their consent for functional cookies.\n    } else {\n        \/\/ The user has not given their consent for functional cookies.\n    }\n}<\/textarea>\n      <script>\n        CodeMirror.fromTextArea( document.getElementById('codemirror-1911313182'), {\n          mode: 'javascript',\n          readOnly: true,\n          lineNumbers: true,\n          firstLineNumber: 1,\n          matchBrackets: true,\n          indentUnit: 4,\n          tabSize: 4,\n          lineWrapping: true,\n        } );\n      <\/script>\n    <\/div>\n    ","protected":false},"featured_media":0,"parent":884,"menu_order":39,"template":"","meta":{"_habefastfse_class":"","hf_wpseo_meta_title":"Questions \/ answers on cookie management","hf_wpseo_meta_description":"Check out our FAQ for WP Simply Cookie and find detailed answers on managing cookie consent, customizing consent banners, and complying with data protection regulations on your WordPress site.","hf_wpseo_meta_robots_index":"","hf_wpseo_meta_robots_follow":true,"hf_wpseo_meta_robots_advanced":"{}","hf_wpseo_meta_canonical_url":"","documentation_description":"","documentation_menu_text":"","documentation_related_pageid":0,"wypo_hidden_role_wypo_users_not_logged":false,"wypo_visibility_role_wypo_users_not_logged":false,"wypo_hidden_role_administrator":false,"wypo_visibility_role_administrator":false,"wypo_hidden_role_habefast":false,"wypo_visibility_role_habefast":false,"wypo_hidden_role_customer":false,"wypo_visibility_role_customer":false,"wypo_hidden_role_habefast_manager":false,"wypo_visibility_role_habefast_manager":false,"wypo_hidden_for_role":false,"wypo_visibility_for_role":false},"class_list":["post-2075","wypo_documentations","type-wypo_documentations","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/wypo.io\/en\/wp-json\/wp\/v2\/wypo_documentations\/2075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wypo.io\/en\/wp-json\/wp\/v2\/wypo_documentations"}],"about":[{"href":"https:\/\/wypo.io\/en\/wp-json\/wp\/v2\/types\/wypo_documentations"}],"up":[{"embeddable":true,"href":"https:\/\/wypo.io\/en\/wp-json\/wp\/v2\/wypo_documentations\/884"}],"wp:attachment":[{"href":"https:\/\/wypo.io\/en\/wp-json\/wp\/v2\/media?parent=2075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}