Home › Forums › ACF PRO › Url and Email field › Reply To: Url and Email field
Just in case anyone is interested in this – I managed to hack together a solution.
I added the following code to the Divi functions.php file to create a simple shortcode. You then just add the shortcode [contact_email] into the code block in Divi:
add_action('init', function(){
add_shortcode('contact_email', function(){
return '<a href="mailto:' . get_field('contact_email') . '">E-Mail</a>';
});
});
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.