Home › Forums › General Issues › How to print email link so it's active › Reply To: How to print email link so it's active
This code is going on a members listing page which is calling in information frm individual member pages. Here’s the only unique code on my members_directory.php file.
<?php
$posts = get_posts(array(
'numberposts' => -1,
'post_type' => 'library',
'orderby' => 'title',
'order' => 'asc',
));
if($posts)
{
foreach($posts as $post)
{
echo '<table class="members">';
echo '<thead>';
echo '</thead>';
echo '<tbody>';
echo '<tr>';
echo '<td colspan="3">';
echo '<h2><a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a></h2>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="3">';
echo '<strong>Parent Organization:</strong>' . ' ';
echo the_field('parent_organization');
echo '<br />';
echo '</td>';
echo '</tr>';
echo '<td colspan="3">';
echo '<strong>Address:</strong>' . ' ';
echo the_field('address');
echo '<br />';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<strong>Contact:</strong>' . ' ';
echo the_field('contact_name');
echo '<br />';
echo '</td>';
echo '<td colspan="1">';
echo '<i class="fa fa-phone"></i>' . ' ';
echo the_field('contact_phone');
echo '<br />';
echo '</td>';
echo '<td colspan="1">';
echo '<i class="fa fa-envelope"></i>' . ' ';
echo the_field('contact_email');
echo '<br />';
echo '</td>';
echo '<tr>';
echo '</tr>';
echo '</tbody>';
echo '</table>';
}
}
?>
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.