Hi all, I need some help with a new project im working on in wordpress. I have a question, maybe it is simple for you but im stumped. "In wordpress" ... I would like to have it so browsing users, that are looking at a post someone posted. Can send an email relating to that post directly to the author. Just by clicking on a button located at the bottom of the post. It would be “mailto:†function of sorts i would guess. ? I want the button to be able to send the email to the author of that specific post, maybe with the post's title in the emailed subject line.. If anyone could give me any idea on what to do, i would really appreciate the help. thx
i'm not really sure on what ready made wp functions to use but if you're only looking to create links, i guess the mailto in the href will work, something along these lines <a href="mailto:<?php echo wp_author().'?Subject='.wp_post_title(); ?>" >link label here</a>
Im gunna try that right now.. i let ya know my progress shortly. Thank alot.. I am using article directory plugin for wordpres, and tried the code you made and did not work. This is my error. <a href="mailto: Fatal error: Call to undefined function: wp_author() in /home/content/i/n/e/ineters/html/mysite/wp-content/themes/article-directory/single.php on line 22 maybe wp_author has been renamed to something else ? i can send ya the plugin if you want.
This should work: <a href="mailto:<?php the_author_email(); ?>?subject=<?php the_title(); ?> ">Contact the author</a> PHP:
Oh nice!!!! It worked thank you sooooooooooooooooo much, Is it possible to have it so link is only clickable to registered users? Or make it go to a form page that hides the authors email? (" i am trying to keep away email harvesters and spammers..") thx oh grand master... You have saved me a huge headache..
Anyone have any clue on how to accomplish my question? " Is it possible to have it so link is only clickable to registered users? Or make it go to a form page that hides the authors email? (" i am trying to keep away email harvesters and spammers..") " And my second question is " I also wanted to know if it is possible to show how many posts are shown in the profile page of the author? example. ( (2) Articles posted ) - And would also like the number shown, to be clickable to go to the authors articles.. What file would i edit for this info to go into the profile page of authors? "