Cookie error. No possibility to define my cookie

You are missing the path parameter. Try setcookie( ‘panier’, $cookie_user_id, time() + DAY_IN_SECONDS, “https://wordpress.stackexchange.com/”); Also, don’t put the callback function in a conditional, put the conditional statement inside the function.

Cookies in template

Why do you think you can only hook into init via Plugin, rather than via the Theme? The setup_theme hook, which fires when the Theme is setup, fires before the init hook. Thus, a Theme is perfectly capable of hooking into init.

Add session or cookie to remember last menu location

Unfortunately, since we aren’t able to see any of your current code, and it’s sort of a vague description of your implementation, it’ll be difficult for anyone to post actual code that will work for you. But to point you to some resources that might help, you might find these helpful: W3 Schools – PHP … Read more

Cookie Details Requested

If you want to see which cookies are loaded with your WordPress install, you can see it in your browser. The number of cookies differs by the number of used plugins, actions on the site, host etc. IE for Google Chrome: rightclick on the site and choose Inspect Element. Click the resources tab and view … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)