Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bojan Radonic – WPMU DEV Support

    (@wpmudev-support4)

    Hey there Schalk Joubert,

    How are you doing today?

    This is definitely possible but it will require making a small change in the code.

    Please download class-ms-view-shortcode-login.php which is located in /wp-content/plugins/membership/app/view/shortcode/, then open it with text editor of your choice and go to line 447, it looks like this:

    ucfirst( $member->name )

    Replace that line with this one:

    ucfirst( $member->first_name )

    Please note that this will be lost once you update the plugin. I’ve talked to our plugin developer and he already added a hook in the development version that you will be able to use in the next plugin update. This is what you will be able to add to your theme functions.php:

    add_filter( 'ms_shortcode_logout_message', 'custom_message', 10, 2 );
    function custom_message( $msg, $member ) {
        return 'You are logged in as ' . $member->first_name;
    }

    Hope this helps ??

    Best regards,
    Bojan

    Thread Starter Schalk Joubert

    (@schalkjoubert)

    Hi, Thank you,

    For some reason it did’t work in the functions.php, but that is fine.
    It worked when I made the change directly in the code.
    And since this will be included in the next version, thats brilliant.

    Thank you.
    schalk

    Plugin Author Bojan Radonic – WPMU DEV Support

    (@wpmudev-support4)

    Hey schalk,

    Glad I could help ??

    Have a nice day!

    Cheers,
    Bojan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display Name and username in sidebar widget’ is closed to new replies.