WordPress.org

Ready to get started?Download WordPress

Forums

myCRED
[resolved] Username display in leaderboard/profile (4 posts)

  1. mucus
    Member
    Posted 4 months ago #

    Hi, I've forced the use of usernames (rather than name) across my site as the name could be changed and the username cannot. It changes everywhere, except on the leaderboard widget and in the profile tab for each players points. How can I make MyCred widget and profile tab display username, rather than name?

    Also the point total seems to display on the far right of the screen, while all other profile fields are to the left (this also happens in the widget). Any ideas on how to fix this?

    https://wordpress.org/plugins/mycred/

  2. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    Hi.

    You can set how each row is displayed along with what user detail you want to show using Template Tags. You can find all the supported User related template tags which are used in the leaderboard and widgets, in the myCRED Codex.

    The %user_name% template tag might be the one you are looking for if I have understood you correctly.

    Let me know if you require any further assistance.

  3. mucus
    Member
    Posted 4 months ago #

    Hi, thanks for responding! I'm not really sure what I'm changing, I have changed all the &name to %user_name in the includes/mycred-widgets.php and updated the file, but it's still displaying the name rather than the username. Can you advise on what I need to change and where for it to take effect? (I appreciate your patience)

  4. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    Hi.

    Sorry for the delay in my reply but it seems notices stopped arriving.

    If you use %user_name% then the users login should be returned unless you have some custom code that changes this.

    %display_name% will return the users display name and %user_nicename% will return the nicename of the user. But you are saying that if you use %user_name% it does not return the users login?

Reply

You must log in to post.

About this Plugin

About this Topic