How to set different cookies for logged in admin users and logged in non admin users?
You can use current_user_can() to detect what type of user is logged in, if any, then use setcookie() and $_COOKIE to test and set the necessary cookies. function wpse_74742_stop_cache_cookie() { if (current_user_can(‘admin’)) { if (empty($_COOKIE[‘disable_cache’])) { setcookie(‘disable_cache’, 1); } } } add_action(‘init’, ‘wpse_74742_stop_cache_cookie’); This is an extremely basic example. There are a lot of details … Read more