Title: Message to user button
Last modified: August 30, 2016

---

# Message to user button

 *  [Danstah](https://wordpress.org/support/users/danstah/)
 * (@danstah)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/message-to-user-button/)
 * As I am using a theme with public profiles, I want to add a button “Send to user”.
   Do you have a shortcode for this?
 * [https://wordpress.org/plugins/front-end-pm/](https://wordpress.org/plugins/front-end-pm/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401466)
 * [https://wordpress.org/support/topic/pm-from-user-page?replies=18#post-6716464](https://wordpress.org/support/topic/pm-from-user-page?replies=18#post-6716464)
 *  [Dysschord](https://wordpress.org/support/users/dysschord/)
 * (@dysschord)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401695)
 * I’m sorry – I went to the link to read about this and posted my own question,
   without realizing it was a Resolved thread. Forgive me for not paying attention.
   
   Here is my question, copied from that thread:
 * I was trying the above code out on my site. I use Ultimate Member plugin, and
   it has custom profile display pages. I added the code to the bottom of the user
   profile page, (from above)
 * `<a href='<?php echo fep_action_url("newmessage&to=USERLOGIN&message_title= TITLE")?
   >'>Send Message</a>`
 * but rather than seeing “Send Message” it shows this instead:
 * 0 new message and 0 new announcement
 * with the 0 new messages being a link which goes to an error page, and the 0 new
   announcement is also a link which will go to the PM area to send a message – 
   but I still have to open a new message and type the user’s name.
 * I need the ability to send a message to the member right from their profile page.
   Since it looks like I’ll use this Front End PM plugin, it makes sense to invest
   in it to make it work. 🙂
 * Can you help?
 *  Plugin Author [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401698)
 * you can contact with me through [https://shamimbiplob.wordpress.com/contact-us/](https://shamimbiplob.wordpress.com/contact-us/)
 *  [esayer](https://wordpress.org/support/users/esayer/)
 * (@esayer)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401805)
 * I also use Ultimate Member and would like to do exactly what Mr. Brown is doing.
   Wonder if there was a solution to this?
    Thank you!
 *  [nexusbroadcast](https://wordpress.org/support/users/nexusbroadcast/)
 * (@nexusbroadcast)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401848)
 * Did you get this to work?
 *  [Dysschord](https://wordpress.org/support/users/dysschord/)
 * (@dysschord)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401849)
 * Yes, I contacted plugin author like he asked, and I made a Donation for the support.
 *  [cds1138](https://wordpress.org/support/users/cds1138/)
 * (@cds1138)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401875)
 * I use Ultimate Member and am trying to do this exact same thing. Could anyone
   explain how to do this?
 * I left a message on the developer’s site (and would be happy to make a donation
   there to get the answer), but my message was ignored. Any help would be appreciated.
 *  [esayer](https://wordpress.org/support/users/esayer/)
 * (@esayer)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401876)
 * Honestly, I couldn’t get it to work, so I got the Ultimate Member Private Messages
   plugin that integrates perfectly.
 *  [cds1138](https://wordpress.org/support/users/cds1138/)
 * (@cds1138)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401877)
 * Thanks, esayer. I will probably end up doing the same thing.
 *  Plugin Author [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401878)
 * I am very busy now a days. So i could not support you. [@dysschord](https://wordpress.org/support/users/dysschord/)(
   Michael Eric Brown) you can share your code which i have given to you with others
   if you do not mind. I do not have enough time now to think again and write those
   codes.
 *  [Dysschord](https://wordpress.org/support/users/dysschord/)
 * (@dysschord)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401879)
 * The code that works for me that Shamim wrote for me is as follows:
 *     ```
       function fep_link_after_profile_pic()
           {
               global $user_login;
   
               if ( $user_login && $user_login != um_profile('user_login'))
                   {
                       echo "<p><a class='fep-button' href='".fep_query_url('newmessage', array('to' => um_profile('user_login')))."'>".__('Contact this User', 'fep').'</a></p>';
                   }
           }
   
       add_action('um_profile_header', 'fep_link_after_profile_pic');
       ```
   
 *  [cds1138](https://wordpress.org/support/users/cds1138/)
 * (@cds1138)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401880)
 * [@shamim51](https://wordpress.org/support/users/shamim51/) and [@dysschord](https://wordpress.org/support/users/dysschord/)–
   Thank you both.
 * Unfortunately, this code doesn’t seem to work for me. I end up with blank user
   profiles. I’ll keep fiddling with it, and hopefully I’ll be able to make it work.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Message to user button’ is closed to new replies.

 * ![](https://ps.w.org/front-end-pm/assets/icon-256x256.gif?rev=2309447)
 * [Front End PM](https://wordpress.org/plugins/front-end-pm/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/front-end-pm/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/front-end-pm/)
 * [Active Topics](https://wordpress.org/support/plugin/front-end-pm/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/front-end-pm/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/front-end-pm/reviews/)

 * 12 replies
 * 6 participants
 * Last reply from: [cds1138](https://wordpress.org/support/users/cds1138/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/message-to-user-button/#post-6401880)
 * Status: not resolved