
Add LinkedIn social share icon to Oleander
Beneath your posts are a variety of social share icons. These icons differ from those in your top-bar area in that, when clicked, they will open up that social network's share platform so that visitors can share your content on their social media accounts.
To add a "LinkedIn" icon to your post social share icons, you can follow these steps:
Navigate to WP Dashboard > Appearance > Editor > and open up the "content.php" file. On lines 125-129, you will see a block of code related to the share icons.
<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>"><i class="fa fa-facebook"></i> <?php _e( 'Share', 'solopine' ); ?></a> <a target="_blank" href="https://twitter.com/home?status=Check%20out%20this%20article:%20<?php print solopine_social_title( get_the_title() ); ?>%20-%20<?php echo urlencode(the_permalink()); ?>"><i class="fa fa-twitter"></i> <?php _e( 'Tweet', 'solopine' ); ?--></a> <?php $pin_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID)); ?> <a data-pin-do="none" target="_blank" href="https://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?php echo $pin_image; ?>&description=<?php the_title(); ?>"><i class="fa fa-pinterest"></i> <?php _e( 'Pin it', 'solopine' ); ?></a> <a target="_blank" href="https://plus.google.com/share?url=<?php the_permalink(); ?>"><i class="fa fa-google-plus"></i> <?php _e( '+1', 'solopine' ); ?></a>
On line 129 you'll see the code for the Google Plus social network (which will soon be removed in a future theme update).
Create a new blank line BELOW this Google Plus code. On this blank line, paste in the following:
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>&title=<?php the_title(); ?>"><i class="fa fa-linkedin"></i> <span><?php _e( 'Share', 'solopine' ); ?></span></a>
Save changes to the file.
If you'd also like to add the LinkedIn social share icon to your pages as well, navigate to WP Dashboard > Appearance > Editor > and open up "content-page.php". Again, on line 34, you'll see the code for the Google Plus social network. Create a new blank line beneath the Google Plus code and paste in the following:
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>&title=<?php the_title(); ?>"><i class="fa fa-linkedin"></i> <span><?php _e( 'Share', 'solopine' ); ?></span></a>
Save changes when finished.