Table of Contents
This function will change the logged in message.
Make sure to:
wppb_login_message is located in Profile Builder: /front-end/login.php
1 2 3 4 5 6 7 | /* * Filter the logged in message from the PB login form. Tags: logged in, login */ add_filter('wppb_login_message', 'wppbc_custom_logged_in_msg', 10, 3); function wppbc_custom_logged_in_msg($logged_in_message, $user_id, $display_name){ return '<p class="wppb-alert">'.sprintf(__( 'You are currently logged in as %1$s.', 'profilebuilder' ), '<a href="'.$authorPostsUrl = get_author_posts_url( $user_id ).'" title="'.$display_name.'">'.$display_name.'</a>' ) . '</p><!-- .alert-->'; } |
This function will change the logged in message to support a different user url.
Make sure to:
1 2 3 4 5 6 7 8 9 | /* * Filter the logged in message from the PB login form to support a different user url. */ add_filter('wppb_login_message', 'wppbc_custom_logged_in_msg_2', 10, 3); function wppbc_custom_logged_in_msg_2($logged_in_message, $user_id, $display_name){ $user_url = '<a href="http://sitename.com/edit-profile" class="wppb-author-url" 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>'; return '<p class="wppb-alert">' . sprintf(__( 'You are currently logged in as %1$s. %2$s', 'profilebuilder' ), $user_url, $logout_url ) . '</p><!-- .alert-->'; } |
Create beautiful front-end registration and profile forms with custom fields. Setup member directories, custom redirects, cutomize user emails & more using the all in one user management plugin.
Get Profile BuilderCombine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.
Get 25% off with the bundle