Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9 from jjc16105/master
add Linkedin share link
  • Loading branch information
jmr06005 committed Aug 30, 2016
2 parents ebacef7 + 7d13680 commit a82b56a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions content-single.php
@@ -1,6 +1,7 @@
<?php
// This is used when viewing a single post.
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php /* if ( has_post_thumbnail() ) {
Expand Down Expand Up @@ -30,7 +31,9 @@
if(empty($twittershareline)) $twittershareline = get_the_title();
$facebookshareline = get_post_meta( $post->ID, 'facebookshareline', true);
if(empty($facebookshareline)) $facebookshareline = get_the_title();

$linkedinshareline = get_post_meta( $post->ID, 'linkedinshareline', true);
if(empty($linkedinshareline)) $linkedinshareline = get_the_title();

?>
<div class="shareline-twitter">
<a href="#" onclick="window.open('https://twitter.com/intent/tweet?text=<?php echo urlencode(preg_replace("/&#?[a-z0-9]+;/i","",html_entity_decode($twittershareline)));?>&url=<?php echo urlencode(get_permalink()); ?>&via=UConnBusiness', 'Twitter', 'width=500,height=500');"><span class="social social-twitter"></span><span><?php echo $twittershareline; ?></span></a>
Expand All @@ -39,6 +42,11 @@
<div class="shareline-facebook">
<a href="http://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>"><span class="social social-facebook"></span><span><?php echo $facebookshareline; ?></span></a>
</div>


<div class="shareline-linkedin">
<a href="https://www.linkedin.com/shareArticle?mini=true&url=<?php echo urlencode(the_permalink()); ?>&title=<?php echo $linkedinshareline; ?>&summary=<?php echo urlencode(get_the_excerpt()); ?>&source=UConn-Aurora"><span class="social social-linkedin"></span><span><?php echo $linkedinshareline; ?></span></a>
</div>
</div>

<?php the_content(); ?>
Expand Down Expand Up @@ -101,7 +109,7 @@
?>

</div>

<div id="social-buttons">
<div class="row">
<div class="col-sm-2">Share on:</div>
Expand Down

0 comments on commit a82b56a

Please sign in to comment.