Home Forums Plugin Support WP User Frontend Pro Output author email in Shortcode

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  Sk 4 years, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26565

    Alejandro
    Member
    Post count: 6

    Hello,

    I have a front-end guest post form for directory listings. With a contact form plugin, i added a shortcode in theme file.

    <?php echo do_shortcode('[contact email_to="email@example.com"]'); ?>

    And I need help with getting email meta field output in that shortcode. So every time a user create listing. Contact form will send message to his/her email.

    Thanks

    #26597

    Alejandro
    Member
    Post count: 6

    Problem is solved. Here is solution if someone else need it.

    <?php $contact_email = get_post_meta( $post->ID, 'contact_email', true );
    echo do_shortcode('[contact email_to="'.$contact_email.'"]'); ?>
    #26769

    Sk
    Moderator
    Post count: 371

    Hello Alejandro,

    Great work.

    Thank you

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Output author email in Shortcode’ is closed to new replies.