Redirection after registration

Hello,
I would like to create a custom page for registration. After the registration I would like to redirect to the submit listing page.

I try this shortcode (with elementor): [hivepress_user_register_form redirect=“mysite.com/submit-listing”]

The registration works but not the redirection.

thx for help

Hi,

Unfortunately, there’s no such feature, it would require a custom implementation.

If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work https://fvrr.co/32e7LvY

I tried using snippet in function.php, but it doesn’t work:

add_action('hivepress/v1/models/user/register', 'my_custom_redirect');

function my_custom_redirect($user) {
    if (!is_wp_error($user)) {
        // Replace 'http://yourwebsite.com/your-page' with the URL of the page you want to redirect to
        wp_redirect('http://yourwebsite.com/your-page');
        exit;
    }
}

is this snippet ok ?

Thank you

Hi,

Please check this doc on adding snippets How to add custom code snippets - HivePress Help Center, because when you make changes to the function.php file, after the theme or extension updates on our side, everything will be restored to the previous settings.
Please also check this list of all redirect snippets: Search · user:hivepress redirect · GitHub

Hope this helps.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.