Hi all. I've got a plugin that needs to set a cookie on the wp_footer hook, but I'm getting this error:
Warning: Cannot modify header information - headers already sent by ...
Is there a way to set a cookie? I tried even calling to a page in the plugin directory using wp_remote_fopen and passing the parameters, but the cookie only gets set if I directly access the cookie setting page.
I need to set the cookie only after I've written content to the footer, so I'm not sure how to approach this. Help!