Reset your password

/*** Auto redirect a user who isn't logged into the site ***/ add_filter( 'pre_get_posts', 'swpm_auto_redirect_non_members' ); function swpm_auto_redirect_non_members() { if (is_admin()){ //Inside the admin dashboard. Nothing to do. return; } //We are on the front-end. Lets check visitor's login status. if( !SwpmMemberUtils::is_member_logged_in() && !is_page( array( 'membership-login', 'membership-join' )) ) { wp_redirect( 'https://www.yourstoryunleashed.com/membership-login' ); exit; } } Skip to content