• bigs38

    (@bigs38)


    Hello,
    I have different posts on my site with a photo, when you clic on it it will open an album but you need to be connected to see it. I want to use the redirect function to redirect people on the right album when they login. For this I use this link :

    /wp-login.php?redirect_to=http://www.mysite.fr/gallery?g2_itemId=1234

    But when I use class=”simplemodal-login” in my href, the end of the link, from the equal signe, is cutted like this: http://www.mysite.fr/gallery?g2_itemId

    Do you have any idea ?
    Thank you

    http://wordpress.org/extend/plugins/simplemodal-login/

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can edit this section, located in default.js:

    if (redirect.length) {
           var href = location.href;
           if (redirect.html().length) {
               href = redirect.html();
           }
           window.location = <The location you want>
    }
    Thread Starter bigs38

    (@bigs38)

    Thanks for the answer. But in my case the redirect link is always different. I can’t write a hard link directly in the code because it depend on my posts, or I don’t understand what I can write in windows.location.

    I use some regexp to change links in my posts (when you are not logged) like this:

    http://www.mysite.com/albums?g2_itemId=1234
    
    to
    
    class="simplemodal-login" http://www.mysite.com/wp-login.php?redirect_to=http://www.mysite.com/albums?g2_itemId=1234

    All seems to work when I use the plugin, the only bug is the truncated link, it remove the =1234 at the end.

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

The topic ‘Redirect link problem’ is closed to new replies.