• Resolved andyprosser10

    (@andyprosser10)



    Hi
    I am using this shortcode:
    [vg_display_data key=”email_address” data_source=”post_data”]
    Which returns an email address.
    How do I make it generate the html so that it’s a clickable link.
    I played with the template option but couldn’t make it work.

    Thanks
    Andy Prosser

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter andyprosser10

    (@andyprosser10)

    Not sure why it’s got a strike through above so posting again…

    I am using this shortcode:
    [vg_display_data key=”email_address” data_source=”post_data”]
    Which returns an email address.
    How do I make it generate the html so that it’s a clickable link.
    I played with the template option but couldn’t make it work

    Thanks
    Andy

    Plugin Author Jose Vega

    (@josevega)

    Hi Andy. I assume that email_address is a custom field. You can do it in 2 ways:

    1- <a href="mailto:[vg_display_data key="email_address"]">[vg_display_data key="email_address"]</a>

    2- [vg_display_data key="email_address" template="<a href="mailto:{var}">{var}</a>"]

    In the second case, the template will render only when the field has a value, in the first case it will render always with an empty email if there’s no value.

    • This reply was modified 5 years, 5 months ago by Jose Vega.
    • This reply was modified 5 years, 5 months ago by Jose Vega.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating an email link’ is closed to new replies.