• Resolved citlallimusartweb

    (@citlallimusartweb)


    When a user registers for a course using the registration form they are redirected to the home page. I need it to redirect to My courses Page

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @citlallimusartweb!

    Could you please try this snippet:

    add_action("sensei_register_form_fields", function() {
    	echo '<input type="hidden" name="redirect_to" value="' . esc_attr( Sensei_Course::get_courses_page_url() ) . '" />';
    });

    You can try using Code Snippets plugin to easily add code snippets in your site.

    Let us know how that goes!

    Hi @citlallimusartweb!

    Sorry about my previous response! That was for redirecting to the “Courses” page.

    If you need the user to be redirected to “My Courses” page after registration, please use this snippet instead:

    add_action("sensei_register_form_fields", function() {
    	echo '<input type="hidden" name="redirect_to" value="' . esc_attr( sensei_user_registration_url( false ) ) . '" />';
    });

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Redirect to Homepage’ is closed to new replies.