How to Add a Contact Form for Each Author Profile Page

This is advanced feature that we are rolling out with the 1.1.1 version of Polytechnic. It's still considered beta in the 1.1.1 version but we wanted to roll this cool feature out for our users. Please let us know if you have any feedback on this so that we can push this out of the beta stage and offer full support.

Approach:

This was a feature request by one of our users. After researching this and digging into the code for a few days, I found that there was really no easy way to 01) Allow the form to automatically forward the message the author/user based on the author.php page and 02) Make this universal for all themes (free). The easiest, most straight forward way to achieve this, would be to create a form for each user > and add it as a user extension option > which would generate on the frontend. But if you have 100 authors, the work involved to keep this amount of contact forms up to date seems like a headache. And although this seemed like a fairly standard use of Contact Forms in WordPress, there were only a couple tutorials out there - and nothing that worked well out of the box.

Note, this example is using OptionTree to insert the shortcode, but if you came across this and didn't have this option included in your theme - a simple do_shortcode in author.php should do the trick ;)

That should provide you with the end result of this contact form being generated on all author pages at the bottom. None Polytechnic users, this is where you would add the do_shortcode to author.php.

If you look at the markup for the form in the screenshot, you'll see that this will auto generate the author's email in the form and in the To: section. Currently this is not being encrypted, but by adding the Really Simple Captcha plugin, you should be able to inhibit most standard bots from harvesting emails. Note, though, that it does still exists in the markup.