[Resolved] How to add a custom Button in members header/profile page
- 
		Hi I would like to add a custom button on the members header file. Does anybody knows how to do it? 
- 
		
			
Hi @jaybee08, try this: function my_custom_button() { // your button here echo ' <br/><div class="mcb"><a href="#" title="">blabla</a><div> '; } add_filter( 'bp_before_member_header_meta', 'my_custom_button' );Add the function to your child theme’s functions.php or to bp-custom.php Hi danbp, Thank you for your quick response. I tried putting the line of codes in my child themes function.php but it doesn’t work. This code was tested today on BP 2.1 and 2013 theme ! Copy/pasting from here works also. Maybe remove the div wich can give some wrong output depending of your theme. 
 Anyway you have to style it (css) to see the button correctly.Hi @danbp, I removed the div and still don’t work. I also switched to the buddypress default theme and 2014 and no luck. However, I tried using other filter like bp_get_send_public_message_button and it shows. But I think using that filter is not ideal. What do you suggest? Thanks again for your help. I really appreciate it. 🙂 I can’t suggest anything because i’m wondering why the code doesn’t work on your site. 
 Personnally I use this code from within bp-custom. Have you tried that ?You also give much details about what you exactly try to do. Adding a button into plugin who contains many by default is like diving in a hay stack ! 
 Wich button or really really custom for going on another page or what ?Where ideally should he appear ? 
 Who can use it ?Each header has at least 6 or seven placeholder, only for positionning something in case off, so there’s no need effectively to use a more dedicated filter like the one you tell. I suggest you to read carefully the BP Codex (ie. anything about JS handling). 😉 
 And for the present case: https://codex.buddypress.org/plugindev/bp-custom-php/
- The topic ‘[Resolved] How to add a custom Button in members header/profile page’ is closed to new replies.