Is there a way to add email and phone to the employees?
Hi, yes, from wp admin go to Types > Custom Fields > Employee info and from Available fields add Phone and Email fields (for field names enter Phone and Email, slugs have to be phone and email).
Also consider using child theme since changes will be lost on next theme update.
Important: if you decide to use child theme search forum for unregister widget since you have to register changed fp-employees.php widget.
One other question: is there a way for those to show up as Font Awesome icons instead of text?
Hi, yes, you can place font awesome icons before these values. In new fp-employees.php file find these two codes:
<p><?php echo esc_html($phone); ?></p> <p><?php echo esc_html($email); ?></p>
and apply font awesome code before, like this:
<p><i class="fa fa-phone"></i> <?php echo esc_html($phone); ?></p> <p><i class="fa fa-envelope"></i> <?php echo esc_html($email); ?></p>
Note: use some other font awesome icons if you want.
Brilliant! I was hoping to have the icon next to the social media icons. Is that possible?
Hi again, it is possible for email, download this file (fp-employees.php). Also add
<i class=“fa fa-phone”></i> before phone if you like as I mentioned earlier.
Thank you! We are very close! When clicking on the email button, it’s putting http:// before my email address. Just point me in the general direction and I can fix it.
Oh, yes, replace this line:
<li><a class="facebook" href="mailto:<?php echo esc_url($email); ?>" target="_top"><i class="fa fa-envelope"></i></a></li>
<li><a class="facebook" href="<?php echo esc_url( $email, 'mailto' ); ?>" target="_top"><i class="fa fa-envelope"></i></a></li>
After that in email field enter address in format for example mailto:firstname.lastname@example.org
Perfect! Thanks for your prompt help! Much appreciated.
Thank you Cris, I’ll mark topic as resolved.