Share Post on Blog - by zf - on WordPress WooCommerce support

This topic has 13 replies, 4 voices, and was last updated 10 years, 3 months ago ago by Eva Kemp

  • Avatar: zf
    zf
    Participant
    September 10, 2015 at 14:04

    Hi Guys, would it be possible to add a social network (Linkedin) to the Share post widget on individual blog posts.

    Thanks

    Z

    12 Answers
    Avatar: Eva
    Eva Kemp
    Participant
    September 10, 2015 at 14:18

    Hello,

    You need edit the file wp-content/themes/royal/framework/shortcodes.php (find section “Share this product” in line 1918) and add this code after 1947th line

    if($linkedin == 1) {
    $html .= '
    <li>
    <a href="http://link_to_your_linkedin_account" class="'.$tooltip_class.'" title="'.__('LinkedIn', ET_DOMAIN).'" target="_blank">
    <i class="ico-linkedin"></i>
    <svg width="38" height="38" xmlns="http://www.w3.org/2000/svg" class="circle">
    <circle cx="19" cy="19" r="18" fill="rgba(255,255,255,0)" stroke="#000000"></circle>
    </svg>
    </a>
    </li>
    ';
    }

    and add this code after the line 1931:
    'linkedin' => 1,

    Regards,
    Eva Kemp.

    Avatar: zf
    zf
    Participant
    September 14, 2015 at 14:46

    Hi There, I have tried this and get the button in no problem. However when i click to share post it redirects to Linkedin and gives me errors. It doesnt seem to be generating the post title/image and url

    Thanks

    Please, contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    September 15, 2015 at 20:35

    Hello,

    I’ve edited link in previously provided code in wp-content/themes/royal/framework/shortcodes.php to the following:

    <a href="https://www.linkedin.com/shareArticle?mini=true&url='.$permalink.'&images='.$image.'" class="'.$tooltip_class.'" title="'.__('Linkedin', ET_DOMAIN).'" target="_blank">

    Please check Linkedin share button now.

    Best regards,
    Jack Richardson.

    Avatar: zf
    zf
    Participant
    September 16, 2015 at 09:41

    Hi, would it be possible to get a an excerpt and image to display on share post aswell.

    Thanks

    Avatar: zf
    zf
    Participant
    September 17, 2015 at 10:38

    Hi, May I please have some feedback on this ticket.
    Thank You

    Avatar: Eva
    Eva Kemp
    Participant
    September 17, 2015 at 10:45

    Hello,

    Have you removed LinkedIn icon?
    May we place it back to check the issue?

    Regards,
    Eva Kemp.

    Avatar: zf
    zf
    Participant
    September 17, 2015 at 11:12

    Hi Eva, yes please. Apologies. Updated the theme to new version and lost that mod. Please do go ahead.

    Thank You

    Regards,

    Z

    Avatar: Brian Johnson
    Brian Johnson
    Member
    September 17, 2015 at 11:24

    Hello

    Please read here how to create the child theme:
    https://codex.wordpress.org/Child_Themes
    Let us know if the child theme is already created and we will add linkedin code to the fuctions.php.

    Regards,
    Brian Johnson

    Avatar: zf
    zf
    Participant
    September 17, 2015 at 11:35

    Hi yes, i have been using a child theme.

    Thanks

    Avatar: Eva
    Eva Kemp
    Participant
    September 17, 2015 at 11:39

    Hello,

    I’ve readded the code.
    The reason you don’t see article content when sharing a post is the authorization you’re using for your site. Try to disable it and check sharing links after that.

    Regards,
    Eva Kemp.

    Avatar: zf
    zf
    Participant
    September 17, 2015 at 12:57

    Hi Eva, thank you for the assistance. By far the best support from all Theme companies.

    Regards

    Z

    Avatar: Eva
    Eva Kemp
    Participant
    September 17, 2015 at 13:06

    Hello,

    Thank you for your feedback!

    Have a nice day.

    Regards,
    Eva Kemp.

  • Viewing 13 results - 1 through 13 (of 13 total)

The issue related to '‘Share Post on Blog’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.