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

add Linkedin share link #9

Merged
merged 4 commits into from Aug 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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