Viewing 9 replies - 1 through 9 (of 9 total)
  • I’m having the same problem. did u got any solution ??

    Plugin Contributor barinagabriel

    (@barinagabriel)

    Hello,

    you can use the built-in filter to change this: wppb_login_url

    Anthony

    (@madburner)

    okay, I was able to modify wppb.login.php (on line 200)

    Modified to this below:
    $siteURL=get_option(‘siteurl’).’/password-recovery?action=lostpassword’;

    That’s the first part to the solution, now the other part is when someone actually types in a wrong username or pass, they’re prompted with an error message and allows them to recovery the pass but that one points to wp-login (which is what we don’t want)

    I found the culprit but I just need help figuring out what to strip, comment or modify?

    I’m guessing it’s the code block below.
    <p class=”error”>
    <?php
    if ( trim($_POST[‘user-name’]) == ”){
    $loginFilterArray[’emptyUsernameError’] = ‘‘. __(‘ERROR:’,’profilebuilder’).’ ‘. __(‘The username field is empty’, ‘profilebuilder’).’.’;
    $loginFilterArray[’emptyUsernameError’] = apply_filters(‘wppb_login_empty_username_error_message’, $loginFilterArray[’emptyUsernameError’]);
    echo $loginFilterArray[’emptyUsernameError’];
    }
    if ( is_wp_error($wppb_login) ){
    $loginFilterArray[‘wpError’] = $wppb_login->get_error_message();
    $loginFilterArray[‘wpError’] = apply_filters(‘wppb_login_wp_error_message’, $loginFilterArray[‘wpError’],$wppb_login);
    echo $loginFilterArray[‘wpError’];
    }
    ?>

    barinagabriel:

    you can use the built-in filter to change this: wppb_login_url

    Hi, what do you mean by that? Am not sure if I completely understand. How do I do that?
    Thanks ??

    Plugin Contributor barinagabriel

    (@barinagabriel)

    Hello,

    filters are to hook functions on; for instance
    add_filter (‘wppb_login_url’, ‘myFunct’, 10, 2);
    function myFunct($oldRedirect, $siteURL){
    /* what you return here will be the new url, as filters have higher priority */

    return ‘< a href = “‘.$siteURL.’/myPasswordRecoveryPageURL ” >Recover Pass'< / a >’;
    }

    Hope this helps!
    Gabriel

    thanks @barinagabriel.
    Your answer helped.but some changes in your code that made my code working
    what i used is

    add_filter ('wppb_login_url', 'myFunct', 10, 2);
    function myFunct($oldRedirect, $siteURL){
    /* what you return here will be the new url, as filters have higher priority */
    
    return '<a href ="'.home_url().'/forgot-password/">Recover Password</a>';
    }

    Plugin Contributor barinagabriel

    (@barinagabriel)

    @sasha1,

    didn’t the variable $siteURL return the needed base-url? What did it return/what did you need to return?

    Gabriel

    @barinagabriel. no way your code was perfact. i used this because throughout my site i have used home_url().
    only error in your code was some extra ' before </a>.
    Other than that you have delivered the perfact…

    Plugin Contributor barinagabriel

    (@barinagabriel)

    @sasha1 I have added that extra whitespace in the html tags to make sure it won’t get transformed into a link, and thus not displaying the html code anymore.

    Gabriel

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Profile Builder] Linking "Forgot password" Link to right page’ is closed to new replies.