Add this snippet to your child-theme functions.php or bp-custom.php
Nedds also a template overload of
/your-theme/content.php
as you should add an action or the function call near the (blog) post.
function bpfr_pm_to_author() {
$author = get_the_author();
echo '<a href="'.wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . get_the_author() ) .' title="Private Message"">Private Message</a>';
}
Ok dandp!
WORK IT !
thank you very much for your support
Great! 🙂
DanBp,
this helped me too. Thank you very much!
Is it possible to have something like that to put a “send private message” on product page (whoocommerce) to private message the User who upload product?
thank you!
Hi, sorry if I ask a question here but it is also with regards to adding a Send Private Message button/link.
I would like to add it on the user profile. For example when a user views my profile, he/she can send me a private message through my profile page.
Any help is greatly appreciated. Thank you!