Home › Forums › General Issues › Email obfuscation › Reply To: Email obfuscation
I’ll post the my full code here in hopes that seeing all of it might reveal some issues. I am extremely new to PHP so this may look like a train wreck. (I use the genesis framework).
<?php
/**
* Template Name: Professional Single
*/
//* Adding ACF on prefessionals pages
add_action( 'genesis_before_entry_content', 'rma_pro_single_acf' );
function rma_pro_single_acf() {
// If fields are present
if( get_field('headshot') ||
get_field('pro_role') ||
get_field('pro_office_phone') ||
get_field('pro_cell_phone') ||
get_field('pro_email') ||
get_field('pro_linkedin')):
$theEmail = get_field('pro_email');
echo
'<div class="professional-details clearfix">
<div class="one-third first">
<img src="' . get_field('headshot') . '">
</div>
<div class="two-thirds contact-details">
<h6>' . get_field('pro_role') . '</h6>
<p><span class="data">Office:</span>' . get_field('pro_office_phone') . '</p>
<p><span class="data">Mobile:</span>' . get_field('pro_cell_phone') . '</p>
<p><span class="data">Email:</span><a href="mailto:'.antispambot($theEmail).'">' . $theEmail . '</a></p>
<p><span class="data">Connect:</span><a href="' . get_field('pro_linkedin') . '"><i class="fa fa-linkedin-square fa-lg"></i> Linkedin</a></p>
</div>
</div>';
endif;
}
genesis();
?>
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!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz
— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.