Skip to:
Content
Pages
Categories
Search
Top
Bottom

customizing profile-header


  • possip
    Participant

    @possip

    hey. i know it’s been asked a few times, but after days of research i’m not getting any further (i also read the article about theme-compatibility, but didn’t help). i’d like to have the displayname beside the avatar on profiles and the mentionname smaller below, so i copied the folder ‘buddypress’ from bp-templates into my child-theme-folder (emmet-lite) and tried to edit member-header.php, but it doesn’t seem to have any effect.

    i tried this code i found somewhere: `<?php if ( bp_is_active( ‘activity’ ) && bp_activity_do_mentions() ) : ?>
    <h2 class=”user-displayname”>
    <?php bp_displayed_user_displayname(); ?>
    <small>@<?php bp_displayed_user_mentionname(); ?></small>
    </h2>
    <?php endif; ?>`

    what am i doing wrong? can someone help? appreciate it.

Viewing 6 replies - 1 through 6 (of 6 total)

  • Henry Wright
    Moderator

    @henrywright

    Can you show us the full path you have to your child theme’s member-header.php file?

    It should be your-theme/buddypress/members/single/member-header.php


    possip
    Participant

    @possip

    yes it’s in the right path, but whatever i change, nothing happens =/


    Bamwempan
    Participant

    @bamwempan1

    I have the same problem :/ My path is good. I don’t understand…


    danbp
    Participant

    @danbp

    Looking at the given code in the first topic let think that you try something hazardous 🙂

    <h2 class='user-displayname'>
    
       <?php bp_displayed_user_displayname(); ?>
    
    <small>@<?php bp_displayed_user_mentionname(); ?></small>
    
    </h2>

    h2 is a title tag whith (generally) a fixed size, depending your theme. Whatever that size is, anything inside the title tag will be affected by his size.

    This means in this case, that your <small> tag is affected by <h2>. So if the h2 is set to 15px and small is not defined, both will be 15px.

    You probably have to declare correctly your CSS classes as explained here.

    FYI, there is a similar template which is cover-image-header.php which you c(sh)ould try to use for your modifications. Maybe the profile page will show up like you want, specially if you allow your members to change their profile header ? 😉


    possip
    Participant

    @possip

    there is a similar template which is cover-image-header.php which you c(sh)ould try to use for your modifications

    that was it. great! thank you 🙂 could make the code working

    specially if you allow your members to change their profile header ?

    i don’t know if i get you right, you don’t think it’s a good idea? It’s just when you want facebook signup for your members, you often have long mentionnames and users may not want their full name in a word that big in the header. In this case I think it’s better like that. But I was more confused by not having the Groupname in the Groupheader 😀 greetings


    danbp
    Participant

    @danbp

    @possip,

    what i wanted to say was that if you use the allow header image option, BP will use a different header template. When you don’t use this option, BP will use member-header.php

    The’re two component who use header’s: members and groups.

    To handle groups header, it is exactly the same logic as for the members header.
    In the group directory (bp-templates/bp-legacy/buddypress/groups), you have 2 files named group-header.php and cover-image-header.php where you can handle goup header customization.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar