This topic has 6 replies, 2 voices, and was last updated 12 years by Cenk.

  • Author
  • #4249
     Cenk
    Participant

    When I sign up with the wrong password or username, the website directs me to the WordPress login page. I would like to change that. Redirecting the WordPress’s Login to a custom login page would be good. Or If the Sweetdate pop-up login stays, and tells me that I should try it again.

    I tried the code below, but it doesn’t work.

    function possibly_redirect(){
    global $pagenow;
    if( ‘wp-login.php’ == $pagenow ) {
    if ( isset( $_POST[‘wp-submit’] ) || // in case of LOGIN
    ( isset($_GET[‘action’]) && $_GET[‘action’]==’logout’) || // in case of LOGOUT
    ( isset($_GET[‘checkemail’]) && $_GET[‘checkemail’]==’confirm’) || // in case of LOST PASSWORD
    ( isset($_GET[‘checkemail’]) && $_GET[‘checkemail’]==’registered’) ) return; // in case of REGISTER
    else wp_redirect( home_url() ); // or wp_redirect(home_url(‘/login’));
    exit();
    }
    }
    add_action(‘init’,’possibly_redirect’);

    Thank you!

    #4250
     Cenk
    Participant

    This code doesn’t work either

    add_action(‘init’,’custom_login’);

    function custom_login(){
    global $pagenow;
    if( ‘wp-login.php’ == $pagenow ) {
    wp_redirect(‘http://thelovetub.com/’);
    exit();
    }
    }

    #4268
     Cenk
    Participant

    I fixed it in the mean time with coding, but I get a strange error message when I get redirected to the login in page. Theme My Login is causing the error. Do you know how to fix the error?

    ——error message—–
    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘wp_shake_js’ was given in /home1/……/public_html/domein.com/wp-includes/plugin.php on line 406

    http://thelovetub.com/login/?redirect_to=http%3A%2F%2Fthelovetub.com%2Ftubs%2Fkinkynation%2F&action=bpnoaccess

    #4284
     SQadmin
    Keymaster

    Hi, I can’t think why is that error coming up.
    We are working to add to v2.2 the ability to login directly form the popup.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #4291
     Cenk
    Participant

    That would be great:) I would like to update without losing the editing files. Is that possible? I
    And is there a link for the popup login? I can’t find it. Thank you very much.

    #4349
     SQadmin
    Keymaster

    To update without losing your changes you have to use the sweetdate-child theme and to have there all your modified templates.
    If you have looked at the existing anchor that triggers the login modal you would have seen it is like this:

    COPY CODE
    
    <a href="#" data-reveal-id="login_panel" class="tiny secondary button radius">LINK

    So this is what you need to have: data-reveal-id=”login_panel”

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #4657
     Cenk
    Participant

    Thank you very much

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?