Change the user is logged in cookie name
I have menu items that are set to be shown/hidden depending on if the user is logged in. I would like to change the default cookie name that WP looks for to determine login status.
My cookie name is
_example and has a value of
1 when user is logged in.
I have tried
define( 'TEST_COOKIE', '_example' ); in
wp-config.php, but that didn’t seem to do the trick.
How can I replace the default cookie name?
Note: I do not need to identify which user is logged in, only whether or not it is true to show/hide menu items.
_example has a value of
1 if logged in, otherwise
_example is not present or