Redirect Non-logged in Users to Register Page

Home Forums Legacy Support Support queries How-to & Troubleshooting Redirect Non-logged in Users to Register Page

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #103845
    chessbee
    Spectator
    I followed the steps given in the url https://wplms.io/support/knowledge-base/redirect-non-logged-in-users-to-register-page-when-they-click-on-take-this-course-button/. But it redirects me to the old register page (the BuddyPress register page), but I created a custom register page and set it as default in Vibeoptions. May I know how do I redirect students to the custom register page instead of BuddyPress register page? I think something to be changed here $id = vibe_get_bp_page_id('register');
    #103912
    H.K. Latiyan
    Participant
    You can change the function with the bellow function and then add the url of your custom registration page in the code instead of vibethemes.com: function custom_non_loggedin_user_redirect($html,$course_id){   if(!is_user_logged_in()){     $extra ='';          $page = 'http://vibethemes.com';     return '<a href="'.$page.'" class="course_button full button">'.apply_filters('wplms_take_this_course_button_label',__('TAKE THIS COURSE','vibe'),$course_id).apply_filters('wplms_course_button_extra',$extra,$course_id).'</a>';    }   return $html; }
    #103932
    chessbee
    Spectator
    Thank you
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Redirect Non-logged in Users to Register Page’ is closed to new replies.