Because that’s ‘where’ the hook is.
Take a look at
buddypress\bp-templates\bp-legacy\buddypress\members\single\member-header.php
Use one of the do_action hooks or create a template overload of that page and put your code in it.
Hi @shanebp,
how can I use my function bpfr_add_mention_from_profile() with do_action?
In member-header.php for shown user-nicename there is function bp_displayed_user_mentionname();
Thanks for the support.
Please use pastebin to show us your function.
Hi #shanebp,
this is my function.
Thanks.
For your situation, it would be easier to use a template overload.
Then you can arrange the header exactly as you want it.
And you should not be using add_filter.
Filters change the markup output.
You should use add_action.
Maybe this hook in member-header: do_action( 'bp_before_member_header_meta' );
Or add your own do_action hook in your template overload.
Ok, I will try to follow your way.
Thanks.
Hi @shanebp,
I try to use
do_action( 'bp_before_member_header_meta' );
but I not managed to work with this.
At the moment, I continue to use my function and I have hidden the error between the button with CSS code.
🙁