Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] send private message link to the author of the post

Viewing 4 replies - 1 through 4 (of 4 total)
  • @danbp

    Participant

    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>';
    } 

    @vuko

    Participant

    Ok dandp!

    WORK IT !

    thank you very much for your support

    Great! 🙂

    @gennaro80

    Participant

    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!

    @modx

    Participant

    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!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] send private message link to the author of the post’ is closed to new replies.
Skip to toolbar