How do I get a list of cookies which the x theme uses?
I have no knowingly added any cookies myself but I understand that there will be at least a few utilized by websites built on the x theme.
Where do I find a list of these and what they do so that i can create gdpr compliant cookie policy?
Thanks,.
Hi There,
Our X theme doesn’t set any cookie values.
To list all the cookies in your Wordpress website, please add the following code under functions.php file locates in your child theme:
function get_cookies( $paras = '', $content = '' ) {
if ( strtolower( $paras[ 0 ] ) == 'novalue' ) {
$novalue = true;
} else {
$novalue = false;
}
if ( $content == '' ) {
$seperator = ' : ';
} else {
$seperator = $content;
}
$cookie = $_COOKIE;
ksort( $cookie );
$content = "<ul>";
foreach ( $cookie as $key => $val ) {
$content .= '<li>' . $key;
if ( !$novalue ) {
$content .= $seperator . $val;
}
$content .= "</li>";
}
$content .= "</ul>";
return do_shortcode( $content );
}
add_shortcode( 'cookies', 'get_cookies' );
After that add the [cookie] shortcode to your page content:
Hope it helps 
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.