Hi,
Here is to add instagram field to the theme, first you have create new Custom Fields from Types > Custom Types > Employee Info.
1. Add URL field https://prntscr.com/a2l2dn then enter “instagram” for the name and slug field
2. Save the go to add new employee item and you should new Instagram field added https://prntscr.com/a2l38z
3. Create a child theme
4. Duplicate “widgets/fp-employees.php” from parent theme to the child theme https://prntscr.com/a2l4e8
5. Open and edit file fp-employees.php in your child theme
6. https://prntscr.com/a2l4u0 add this line:
$instagram = get_post_meta( get_the_ID(), 'wpcf-instagram', true );
under this line:
$linkedin = get_post_meta( get_the_ID(), 'wpcf-linkedin', true );
7. https://prntscr.com/a2l783 change this line:
<?php if ( ($facebook != '') || ($twitter != '') || ($google != '') || ($linkedin != '') ) : ?>
to:
<?php if ( ($facebook != '') || ($twitter != '') || ($google != '') || ($linkedin != '') || ($linkedin != '') ) : ?>
8. https://prntscr.com/a2l52y add this line:
<?php if ($instagram != '') : ?>
<a href="<?php echo esc_url($instagram); ?>" target="_blank"><i class="fa fa-instagram"></i></a>
<?php endif; ?>
under this line:
<?php if ($linkedin != '') : ?>
<a href="<?php echo esc_url($linkedin); ?>" target="_blank"><i class="fa fa-linkedin"></i></a>
<?php endif; ?>
9. Open functions.php in your child theme and add this line:
if ( function_exists('siteorigin_panels_activate') ) {
require_once get_template_directory() . "-child/widgets/fp-employees.php";
}
10. Activate your child theme first, and you will get an error in your site.
10. to fix the error, open functions.php in your parent theme and change this line:
require get_template_directory() . "/widgets/fp-employees.php";
to:
// require get_template_directory() . "/widgets/fp-employees.php";
And about the custom link, please follow this thread https://athemes.com/forums/topic/link-from-a-employee-in-moesia/
Let me know how its worked.
Regards,
Awan