Forums
(@tabithatomsin)
8 years, 5 months ago
Thank you so much! This did it!
add_action( 'init', 'my_setcookie_example' ); function my_setcookie_example() { $current_user = wp_get_current_user(); setcookie( 'id', $current_user->ID, 3 * DAYS_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); }