Quantcast
Channel: Topic Tag: contact-form | WordPress.org
Viewing all articles
Browse latest Browse all 5995

Viktor Nagornyy on "Jetpack contact form by do_shortcode with page author email"

$
0
0

You could try using this to get the email:

$email = get_the_author_meta('user_email');

and then insert it inside your shortcode.

<?php echo do_shortcode("[contact-form to='".$email."' subject='Contact Author Name'][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][contact-field label='Comment' type='textarea' required='1'/][/contact-form]"); ?>

If you want to insert more author's info, here's more info:
http://codex.wordpress.org/Function_Reference/get_the_author_meta


Viewing all articles
Browse latest Browse all 5995

Trending Articles