Multiple phone and email
-
Hi there,
sometimes we need multiple phones or email for one people, so hacking the staff-list.php might be the way to go (improve and include into the plugin ??
copy templates/staff-list.php to your theme directory
i use a dash to separate phone numbers, so replace
<?php echo $my_phone ?>
with
<?php echo str_replace("-","<br />",$my_phone) ?>
and add css styles to display numbers in column.For email you’ll have to split $my_email value according to space separating emails in your field.
first we test for space in email value, if there is we split to an array then loop over and echo values and links.Hope that helps
<?php if (strrpos($my_email," ")) { $pieces = explode(" ", $my_email); foreach ($pieces as $piece) {echo '<a href="mailto:'.$piece.'">'.$piece.'</a><br />';} } else {echo '<a href="mailto:'.$my_email.'">'.$my_email.'</a>';} ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Multiple phone and email’ is closed to new replies.