Can't set a cookie in the footer?? (2 posts)

  1. Pat Friedl
    Posted 5 years ago #

    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!

  2. Pat Friedl
    Posted 5 years ago #


    anybody know how to get a cookie set using a plugin in the footer?

Topic Closed

This topic has been closed to new replies.

About this Topic