Use following code within loop
<a href="'.get_bloginfo("wpurl").'/SLUG-OF-FEP-PAGE/?fepaction=newmessage&to=' . the_author_meta("user_login"). '">Send Message</a>
Change SLUG-OF-FEP-PAGE with your Front End PM page slug
Works a charm – thank you!
Dear
Did not work with me in the form required
Are taken back to the same article link 🙂
Thank you now works well
The code developed in this way
/messages/?fepaction=newmessage&to=<?php the_author_meta(“user_login”);?>>Send Message
But Can I put it in the comments
To send a private message to suspended
you want to send private message to comment author?
you want to send private message to comment author?
YES
Thank you
use
[code]
get_comment_author()
instead of
the_author_meta("user_login")
Thank you
Can I add a title and a link to the Post directly by simply pressing a button to send a message
Thank you
Hi, I am creating a real estate listing’s page where users can post their properties. Can I apply this for my listings pages? Like to have a button or link “Contact author” and it automatically opens a new message with the listing author added as a recipient?
Thank you!
I tried adding this code to my listings page, but it takes me to a search results page at the address:
http://mysiteaddress.com/listingname/’.getbloginfo(
That’s the code I used was exactly the same as you wrote here, just changed “SLUG-OF-FEP-PAGE” to “messages”.
My Front End PM page is “messages”.
Hope you could help.
which code u have used? does not seem that u had used my code because it should not be like ur given url.
have u used within loop?
for listing r u using custom post type or separate table?
I have used the code you provide above, I use premiumpress so I edit my listings page here as shown in this picture: http://postimg.org/image/3pn0hz409/
Then it creates this clickable link in listings page: http://postimg.org/image/9gd6vpc09/
And then when I click it, I get here:
http://postimg.org/image/a4m1enaq1/
Thank you for your reply, hope these pictures explain my problem.
You are using in HTML but my given code is for php thats why this code is not rendering. You can use this code in your template file(php file).
Thank you for your reply, I added it in my php file here: http://postimg.org/image/may5ypgnh/
but the outcome is exactly the same:
-it creates a clickable “Send Message” link
-when I click it it takes me to the same error page http://postimg.org/image/a4m1enaq1/
I am probably doing something wrong here.