BuddyDev

Search

Is it possible to split up the item content in the header?

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #26951

    Hi Brajesh, is it possible to split up the item content in the header?

    As it is, the header contains activity, item meta buttons and other profile information, but all in one div which makes it impossible to style.

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24715
    Brajesh Singh on #26953

    Hi Carsten,
    If you are comfortable with php, you can copy the member-header.php to your theme(buddypress/members/single) and modify as you please.

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #26956

    Hi Brajesh, not comfortable, but I will give it a try. Probably a dum question, but does the system accept two to copies of the member-head.php, I was thinking it could be an option to copy/paste and separate the elements this way 😉

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24715
    Brajesh Singh on #26964

    Hi Carsten,
    Please keep a copy as backup and then update it as you please.

    The file from your theme is selected and if it is not present, It is taken from the parent theme/template pack.

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #26966

    Hi Brajesh, one question, after I have been looking at the member-header.php content.

    The different items, avatar, activity, actions, and meta all are in their own divs. This makes it possible to change the order of the divs, but since they all are in the same directory file, you cant really separate them, right?

    What I want, first of all is to move my member’s header meta to after my div profile.

    Question, can I just paste this, and which file should I paste it into to display under the profile fields in the profile?

    Thanks in advance

    Carsten

    		 /**
    		  * Fires after the group header actions section.
    		  *
    		  * If you'd like to show specific profile fields here use:
    		  * bp_member_profile_data( 'field=About Me' ); -- Pass the name of the field
    		  *
    		  * @since 1.2.0
    		  */
    		 do_action( 'bp_profile_header_meta' );
    
    		 ?>
    
    	</div><!-- #item-meta -->
    
    </div><!-- #item-header-content -->
    
    <?php
    
  • Keymaster
    (BuddyDev Team)
    Posts: 24715
    Brajesh Singh on #26967

    Hi Carsten,
    You should keep all the contents in the same file but you can use different divs/elements to enclose them.

    If you put them in separate files, you will need to include it in the members-header.php via get_template_part() or bp_get_template_part()

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #26975
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24715
    Brajesh Singh on #26980
    This reply has been marked as private.
  • Participant
    Level: Yogi
    Posts: 1117
    calu on #27019
    This reply has been marked as private.

You must be logged in to reply to this topic.

This topic is: not resolved