I'm trying to set and read cookies within WordPress across my site by way of a custom plugin that I wrote.
add_action( 'wp_head', 'my_cookie_code' );
The code that I wrote works, however, once it's deployed to our live server it does not.
I think this is because of our WordPress caching system. When I turn it off, my cookie code works but once it's on, it does not.
Without turning off my WordPress caching system, how can I get my code to work with it?
I want each page to be cached by the caching system but I still want my little bit of code to be executed.
Thanks