Title: Adding Likedin share button
Last modified: May 3, 2018

---

# Adding Likedin share button

 *  Resolved [ramisadi](https://wordpress.org/support/users/ramisadi/)
 * (@ramisadi)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/adding-likedin-share-button/)
 * Hi, I need to add a button for Linkedin share, I tried the following code in 
   the template file:
 *     ```
       // Linkedin
       			if ( 'linkedin' == $site ) { ?>
   
       				<li class="linkedin">
       					<a href="https://www.linkedin.com/shareArticle?mini=true&url=<?php echo rawurlencode( esc_url( $product_url ) ); ?>&media=<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>&description=<?php echo rawurlencode( $product_title ); ?>" target="_blank" onclick="ops_onClick( this.href );return false;">
       						<span class="ops-icon-wrap">
       							<svg class="ops-icon" aria-labelledby="ops-linkedin-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
       								<path d="M23.954 4.569c-.885.389-1.83.654-2.825.775 1.014-.611 1.794-1.574 2.163-2.723-.951.555-2.005.959-3.127 1.184-.896-.959-2.173-1.559-3.591-1.559-2.717 0-4.92 2.203-4.92 4.917 0 .39.045.765.127 1.124C7.691 8.094 4.066 6.13 1.64 3.161c-.427.722-.666 1.561-.666 2.475 0 1.71.87 3.213 2.188 4.096-.807-.026-1.566-.248-2.228-.616v.061c0 2.385 1.693 4.374 3.946 4.827-.413.111-.849.171-1.296.171-.314 0-.615-.03-.916-.086.631 1.953 2.445 3.377 4.604 3.417-1.68 1.319-3.809 2.105-6.102 2.105-.39 0-.779-.023-1.17-.067 2.189 1.394 4.768 2.209 7.557 2.209 9.054 0 13.999-7.496 13.999-13.986 0-.209 0-.42-.015-.63.961-.689 1.8-1.56 2.46-2.548l-.047-.02z"/>
       							</svg>
       						</span>
       						<div class="product-share-text"><?php esc_html_e( 'Share This Class', 'ocean-product-sharing' ); ?></div>
       					</a>
       				</li>
   
       			<?php }
       ```
   
 * but it doesn’t work, I don’t know where is the issue here, and also I need to
   find the proper svg path for the icon.
    Can I get some help here? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [oceanwp](https://wordpress.org/support/users/oceanwp/)
 * (@oceanwp)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/adding-likedin-share-button/#post-10264353)
 * Hello, when you add an icon manually, you don’t need to add “if ( ‘linkedin’ 
   == $site ) {“, just: [https://pastebin.com/R2dkGm3N](https://pastebin.com/R2dkGm3N)
    -  This reply was modified 8 years, 1 month ago by [oceanwp](https://wordpress.org/support/users/oceanwp/).
 *  Thread Starter [ramisadi](https://wordpress.org/support/users/ramisadi/)
 * (@ramisadi)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/adding-likedin-share-button/#post-10264999)
 * Thank you, I have done some turn around and edited the pintrest share code to
   linkedin, since I am not using pintrest, I had just edited the link and the text
   and inserted the fa fa linkedin icon, and it worked.
    But now this is the right
   way to do it, I will try it for sure. Thanks.
 *  Plugin Author [oceanwp](https://wordpress.org/support/users/oceanwp/)
 * (@oceanwp)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/adding-likedin-share-button/#post-10266694)
 * Yes, it is a good solution too 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding Likedin share button’ is closed to new replies.

 * ![](https://ps.w.org/ocean-product-sharing/assets/icon-256x256.png?rev=2670327)
 * [Ocean Product Sharing](https://wordpress.org/plugins/ocean-product-sharing/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ocean-product-sharing/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ocean-product-sharing/)
 * [Active Topics](https://wordpress.org/support/plugin/ocean-product-sharing/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ocean-product-sharing/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ocean-product-sharing/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [oceanwp](https://wordpress.org/support/users/oceanwp/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/adding-likedin-share-button/#post-10266694)
 * Status: resolved