Support » Plugin: Realtyna Organic IDX plugin + WPL Real Estate » Send message to listing agent thought buddypress

  • Resolved eirikv



    I wounder where I can put the following code to implement
    a message button to send a private message trough
    buddypress, rather than a listing agents contact form.
    (a message copy to their email is sent anyway by BP)

    … an if the code gets the listing agent?

    * Add buddypress message form after agent info
    function bp_custom_get_send_private_message_link($to_id,$subject=false,$message=false) {
    //if user is not logged, do not prepare the link
    if ( !is_user_logged_in() )
    return false;
    $compose_url=bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?';
    $compose_url.=('r=' . bp_core_get_username( $to_id ));
    * $compose_url.=("&content=".$message);
    return wp_nonce_url( $compose_url ) ;
    //for auto populating message content 
    function bp_custom_message_content_value($content){
    if(!empty ($content))
    return $content;
    return $content;
Viewing 1 replies (of 1 total)
  • Plugin Author Realtyna



    You can add a function to following hook and do what you want.


    You should be able to see the submitted form data on $_POST variable.
    Please let us know if there is anything else we can help you with.

    Realtyna Support Team

Viewing 1 replies (of 1 total)
  • The topic ‘Send message to listing agent thought buddypress’ is closed to new replies.