Login From External Page Needs Redirect To Original Page


Well-known member
I currently have the following in a WordPress child theme:

echo '<span id="member" class="logIn_menu_class"><a href="http://community.tuxreportsnetwork.com/login" class="OverlayTrigger inner">Log In or Sign Up</a></span>

What should I put in the href to get a redirect back to the current page? If I manually put something into the browser like the following ....

I get the community login but the redirect never happens.
Any thoughts?


Well-known member
OK. I'm stumped :(

This is probably going to be so obvious that I'm going to be embarrassed but ... OK. So be it !

  <div id="xenlogin">
            <form action="http://community.tuxreportsnetwork.com/login/login" method="post" id="pageLogin">
              <div class="ctrlWrapper">
                <dl class="ctrlUnit">
                  <label for="LoginControl">Your name or email address:</label>
                  <input type="text" name="login" id="LoginControl" class="textCtrl" tabindex="101" />
                  <label for="ctrl_password">Password:</label></dt>
                  <input type="password" name="password" id="ctrl_password" class="textCtrl" tabindex="102" />
                  <input type="submit" class="button primary" value="log_in" tabindex="104" data-loginPhrase="log_in" data-signupPhrase="sign_up" />
                  <label for="ctrl_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_remember" tabindex="103" /> stay_logged_in</label>
              <input type="hidden" name="cookie_check" value="1" />
              <input type="hidden" name="redirect" value="$requestPaths.requestUri " />
              <input type="hidden" name="_xfToken" value="$visitor.csrf_token_page " />

This obviously fails with the message:

The requested page could not be found.

My understanding is that $requestPaths.requestUri and $visitor .... are from XenForo which I can call from the WordPress theme ... if I knew how :)

Any suggestions?

Update: Let me give a few more details as I'm trying things. This code causes the WordPress page not to load.

              <input type="hidden" name="redirect" value=" ' . $XF->visitor->get( 'requestPaths.requestUri' ) . ' " />
               <input type="hidden" name="_xfToken" value=" ' . $XF->visitor->get( 'visitor.csrf_token_page' ) . ' " />
Last edited:


Well-known member

Here is the code for the redirect to a current blog URL:

<input type="hidden" name="redirect" value=" ' . get_permalink( $post->ID ) . ' " />

I still need to work on the cookie issues because this is a multisite / multidomain configuration ....


Well-known member
Just wanted to add, that I had a plugin made by a XF dev and the redirection works perfectly for XenWord. My blog and forum are on different subdomains as well. If anyone is interested in the addon let me know.