• Resolved md.faramarz

    (@mdfaramarz)


    Hi,
    Thanks for your good plugin.
    How can I sett up “Profile Builder plugin” to user can edit his profile in Frontend? When the “Test” user logged in, the message: ( You are currently logged in as “Test” ) When user clicked on “Test” how can I redirect the page to Edit Profile page ([wppb-edit-profile]) ?
    And please help me to prevent the user open backend (Dashboar) when clicked “Edit Profile” link.

    Thanks

    https://wordpress.org/plugins/profile-builder/

Viewing 1 replies (of 1 total)
  • Plugin Author adispiac

    (@adispiac)

    Hi,
    You can create a front-end edit profile form using the [wppb-edit-profile] shortcode in any page.

    You can then change the link from “Test” user which now points to the author archive page using this filter: wppb_login_message.

    You can use the following code:

    function wppb_change_login_message_link( $logged_in_message, $user_ID, $display_name ){
        $logged_in_message = '<p class="wppb-alert">';
        $user_url = '<a href="enter your edit profile page link" title="'.$display_name.'">'.$display_name.'</a>';
        $logout_url = '<a href="'.wp_logout_url( $redirectTo = wppb_curpageurl() ).'" class="wppb-logout-url" title="'.__( 'Log out of this account', 'profilebuilder' ).'">'. __( 'Log out', 'profilebuilder').' »</a>';
        $logged_in_message .= sprintf(__( 'You are currently logged in as %1$s. %2$s', 'profilebuilder' ), $user_url, $logout_url );
        $logged_in_message .= '</p><!-- .wppb-alert-->';
        return $logged_in_message;
    }
    add_filter('wppb_login_message','wppb_change_login_message_link', 10, 3);

    Make sure to add the code above in an empty plugin or your active theme’s functions.php.
    * Replace the link in the code above with the link to your front-end edit profile page.

    As for preventing the users to ever access the back-end dashboard, I would suggest you have a look into Custom Redirects module available in the Pro version.

Viewing 1 replies (of 1 total)

The topic ‘Edit profile in frontend’ is closed to new replies.