Skip to:
Content
Pages
Categories
Search
Top
Bottom

Dispaly Nickname instead of username

  • @nightstalker101

    Participant

    At the moment I call the username with the following templatetag:

    <?php bp_the_site_member_name() ?>

    When I call it in this way, it displays the full name and not the Nick name (username).

    Is there any function, to call the user name?

    Lars

Viewing 5 replies - 26 through 30 (of 30 total)
  • @jeffsayre

    Participant

    Okay,

    Try this instead. Remember you’ll need to set the $member variable in your foreach:

    <a class="group-link" href="<?php bp_the_site_member_link() ?>"><?php echo bp_core_get_username( $member ); ?></a>

    @nightstalker101

    Participant

    …maybe a stupid questions from me. but:

    What do I have to set for $member?

    Lars

    @nightstalker101

    Participant

    I cannot find any foreach on the mebers loop, but I think, you mean the code after these lines

    <?php while ( bp_site_members() ) : bp_the_site_member(); ?>[code]
    till to the endif.
    Please let me knwo, what I have to set for $member.

    [code]<?php while ( bp_site_members() ) : bp_the_site_member(); ?>
    till to the endif.
    Please let me knwo, what I have to set for $member.

    [code]

    till to the endif.

    Please let me knwo, what I have to set for $member.

    @nightstalker101

    Participant

    I found a solution. Not the best but it works:

    The main problem began at the signup. I had the field “full name”. When this field is there, always the full name gets dispalyed, not the username. When I rename thsi field, the real name still gets diplayed instead of the username. When I remove the name of the field, better the label, I get only the username displayed. Jusr how I want it. Great.So I removed the name, gave the div class that includes the Full name box an id and removed it with css. What I do not like in my solution: I had to modify the core files…

    @jeffsayre

    Participant

    Nightstalker101-

    I\’m sorry that it has taken so long to reply to your question. I\’ve been on the road and have only had an hour here and there.

    What I do not like in my solution: I had to modify the core files…

    Well, as you know, it is never a good idea to modify core files. Have you tried using this:

    bp_the_site_member()

    in place of this:

    bp_the_site_member_name()

    I do not have the BP core files open right now so I’m just taking a guess here.

Viewing 5 replies - 26 through 30 (of 30 total)
  • The topic ‘Dispaly Nickname instead of username’ is closed to new replies.
Skip to toolbar