Hello @amiraroberts ,
Unfortunately, this is a known issue in some WordPress installations and we do not have a solution.
Hello @amiraroberts,
One possible solution is to add the following code to your themes functions.php.
if( (function_exists('is_login') && is_login()) &&
(isset($_GET['wlcms-action']) && $_GET['wlcms-action'] == 'preview') &&
(isset($_GET['preview_section']) && $_GET['preview_section'] =='login' )
) {
if (!function_exists('wp_get_current_user')) {
function wp_get_current_user()
{
wp_set_current_user( 0 );
return new WP_User(null);
}
}
if (!function_exists('is_user_logged_in')) {
function is_user_logged_in()
{
return false;
}
}
}
Please test it first. Let me know if it works.