How to add additional social buttons in Sydney FP:Employess

Hi, I have found this thread how to add additional social media or any other buttons to emlployee area:

Tried to follow, but maybe it is outdated, because I do not find back fields or employee metadata. In thread it says that this info is located in Sydney Toolbox/inc/metaboxes/employees-metaboxes.php. When I view files through FTP program, I do not see a folder named Toolbox.

Thank you.

Hello there,

Please try this jQuery code solution that safer as you do not need to touch any theme’s file. Let me know if id doesn’t work for you.

Regards,
Kharis

Thank you for the suggestion. I was able to add linkedin using the jquery method.

How can I add email? I used this code:
'email': 'mailto:test@gmail.com',
But it didn’t work.

Also, how can I add “Read More” button, so when moused over the image, it takes to the bio page of that person.

I know by clicking on Name it will take to bio page, but I would like to add a “Read More” or “Info” button/icon, so when clicked it would take to that bio page.

It seems I can modify fp-employees.php template, but is there a jquery way to accomplish that too?

Thank you

I have found this thread regarding linking employee image to their bio page and it worked for me:

Now, I just need to figure out how to add email or phone icon to appear on the image when moused-over. As mentioned this code below didn’t work:
'email': 'mailto:test@gmail.com'

Thank you.

Hello there,

Add these lines of code right before return html;

    if(url.email){
        html += '<li><a href="'+url.email+'" target="_blank"><i class="fa fa-envelope"></i></a></li>';
    }

Then you can use this code to define email link and icon.

   'email': 'mailto:chrisdonovan@gmail.com'

Regards,
Kharis

1 Like

Thank you so much. I totally missed that part. It worked great!

Though, is there any way to add that metadata in the employee CPT so the user that is not tech savy could make changes/additions to social media and email.

Hello there,

Adding inputs metadata UI to editor panel of employee CTP is a complex task to explain here in the forum. I can only recommend you try playing around with it with Advanced Custom Fields plugin.

Regards,
Kharis

Thank you. I have used ACF before and will try to play with it to get metadata added to employees. Might respond here again if I ran into a problem.

Thank you for suggestion.

I need some help in integrating php with the custom jquery that I am using to add the social icons. I have added custom youtube metadata using ACF. But not familiar with jquery or js coding.

I know how to pull ACF input in php:
<a href="<?php the_field('youtube'); ?>">
OR
$youtube = the_field('youtube');
<a href="<?php echo $youtube; ?>" >

Where do I add this in jquery?

Working with ACF means that you’ll need to touch the correspond template file of the theme. For employees widget, it is in the widgets/fp-employees.php file. You’ll need to do some adjustments with the archive-employees.php file as well, which is the archive page template for employees, that can be accessed at yoursite.com/employees.

I am sorry for I can’t provide you with exact code solution here, as ACF integration is really out of the scope of support service we can offer here in the forum. You may hire a WordPress coder to get all things right.

Thank you for your understanding.

Regards,
Kharis

Thank you for suggestions. Since I am going to copy those files (widgets/fp-employees.php, archive-employees.php) to my child theme, do I need to do all these steps too:

  • require employee widget file from childtheme
  • unregister default employee widget
  • register new widget
  • add add all this to child’s functions.php file.

I saw this outlined in the thread below.

Hello there,

Yes! You should do that! Transferring the widget to child theme is safe, so you won’t have any trouble updating the theme in the future.

Regards,
Kharis