• Resolved Fernando García

    (@promostudio)


    Hello,

    I am trying to set redirection URLs with the UM redirections post metabox and they don’t work.

    I want to redirect login, register and reset password to the main account page to login users (as show them to login users is a nonsense).

    I am trying this configuration:

    Restrict: Enabled
    Who can access: Disconnected users.
    Action: redirect to custom url + the url.

    And it does not work in any case.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @promostudio

    Please try this code snippet to redirect users from login, register and password pages to your custom page URL e.g. /homepage:

    add_action("template_redirect","um_082021_redirect_from_umpages");
    function um_082021_redirect_from_umpages(){
        if( ! function_exists('um_is_core_page') ) return;
    
        if( um_is_core_page("login") || um_is_core_page("password-reset") || um_is_core_page("register") ){
    
            wp_redirect("/homepage");
        }
    }
    

    You can add the above code to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @promostudio

    ..Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page redirection errors’ is closed to new replies.