• I currently have a hook that will redirect a user on login:

    add_action('login_form', 'glue_login_redirect');
    function glue_login_redirect() {
        global $redirect_to;
        global $wpdb;
        if(isset($_GET['redirect_to'])) {
            // Redirect User
            $redirect_to = $_GET['redirect_to'];
        }
    }

    This takes the redirect_to URL parameter and will redirect the user upon logging in. In general this works great and sends the user to the correct page, however as soon as you append a section to the URL using the div ID it won’t include that in the redirect.

    E.g
    https://google.com redirect will work fine, but if I want to redirect to the section #header on that website it will take the user to the page, but not to the section.

    Any ideas on how to fix?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Redirect on login using ID’ is closed to new replies.