add_action('send_headers', function () { if (is_user_logged_in()) { header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0'); } });