Employee widget: Email and LinkedIN


#1

Hello,

I woul dlike to add a link for email and a link for LinkedIn to the (otherwise fabulous) Sydney Employee widget.

I understand that I need to add code… Can you please let me know what code, and where?

Regards,

Bad Producer Productions


#2

Hello there,

Thank you for asking.

You can add your custom field URL through Dashboard > Types > Employee Info. Then pick “URL” field from Available fields box.

To print out the URL with an icon, open widgets/fp-employees.php file, then insert your code within these lines. To get the URL value, use the following snippet.

$custom_link = get_post_meta( get_the_ID(), 'field-slug', true );

Adjust the field-slug to your own.

I hope this reply helps.

Regards,
Kharis


#3

P.S.

As you are editing the core theme’s file, you should take at your own risk. The changes you have made will be overridden once the theme is updated in the future.