Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    That field is indeed used to link to LinkedIn Profiles. If you’d like to add a new LinkedIn Company page icon to the widget, you can paste the following code in your theme’s functions.php file, or in a functionality plugin (be sure to change the values to use your company name and URL):

    function jetpackme_linkedin_company_icon( $html_array ) {
        return
            $html_array +
            array(
                25 =>    // This key can be modified to change the order the new item will appear in the list
                    '<a title="Automattic" '
                    . 'href="https://www.linkedin.com/company/automattic" '
                    . 'class="genericon genericon-linkedin" target="_blank">'
                    . '<span class="screen-reader-text">Automattic Company Profile</span></a>'
            );
    }
    add_filter( 'jetpack_social_media_icons_widget_array', 'jetpackme_linkedin_company_icon' );

    FYI, posted this on another forum, but found my resolution much easier:

    OK, I figured out how to do it for LinkedIn, so you can share a company link and not a username profile, and will share what I did, so here you go:

    1. In WordPress, go to – Plugins – Edit Plugins and find this page of code you’ll need to edit:
    jetpack/modules/widgets/social-media-icons.php

    2. Go into the page, and find this code to edit:
    ‘linkedin’ => array( ‘LinkedIn’, ‘https://www.linkedin.com/in/%s/&#8217; ),

    3. Simply change it to the following (see ‘in’ was changed’ to ‘company’:
    ‘linkedin’ => array( ‘LinkedIn’, ‘https://www.linkedin.com/company/%s/&#8217; ),

    4. Go into the Social Media Icons Jetpack widget, and put your company ID in the field for “LinkedIn username:” (even though it’s not the username, it will work).

    That should do it! Let me know if you have any issues or if it worked for you too.

    Thanks,
    Brad

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    @staveb I would strongly recommend against editing core plugin files, from Jetpack or from any other plugin. Indeed, your changes will be overwritten as soon as you update the plugin.

    Instead, you can use the solution I posted above to add a new custom Social Media Icon linking to your LinkedIn company page. The code I posted above can be added to a functionality plugin, and thus won’t be overwritten when you update Jetpack.

    @jeremy, isn’t better to fix this issue in further updates instead letting people fixing this manually?

    Thanks!

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    @hans That’s not really an issue; by adding the code above, you’re not making any changes to the existing LinkedIn option; you’re just adding an additional option to the list of available Social Media Icons.

    Do you think we should make the additional LinkedIn option part of the original widget?

    Yes, I would love this add-on for the plug-in. As it is now, this plug-in isn’t a good fit for company/org webpages since you can’t link it to your most public “professional” social network–LI (unless you want to link it to an individual member of the company’s profile…but that seems weird and inappropriate). Thanks for considering this ??

    netsimpel

    (@netsimpel)

    I have added the code to the functions.php of my theme, but still it is linking to LinkedIN profile page instead of company page. In the widget i don’t see also a input field where i can add the company page url.

    What i’m doing wrong?

    Can you please help me?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Jetpack adding /in/ to LinkedIn url’ is closed to new replies.