/* Crunchify Social Sharing Buttons Bottom */ function crunchify_social_sharing_buttons($content) { if(is_singular() && !is_page(14)){ // sample: 234 is a page id // Get current page URL $crunchifyURL = get_permalink(); // Get current page title $crunchifyTitle = str_replace( ' ', '%20', get_the_title()); // Get Post Thumbnail for pinterest $crunchifyThumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); // Construct sharing URL without using any script $twitterURL = 'https://twitter.com/intent/tweet?text='.$crunchifyTitle.'&url='.$crunchifyURL.'&via=Finding A Man'; $facebookURL = 'https://www.facebook.com/sharer/sharer.php?u='.$crunchifyURL; $googleURL = 'https://plus.google.com/share?url='.$crunchifyURL; $bufferURL = 'https://bufferapp.com/add?url='.$crunchifyURL.'&text='.$crunchifyTitle; $linkedinURL = 'http://www.linkedin.com/shareArticle?url='.$crunchifyURL.'&text='.$crunchifyTitle; $redditURL = 'http://reddit.com/submit?url='.$crunchifyURL.'&text='.$crunchifyTitle; $stumbleuponURL = 'http://www.stumbleupon.com/submit?url='.$crunchifyURL.'&text='.$crunchifyTitle; // Based on popular demand added Pinterest too $pinterestURL = 'https://pinterest.com/pin/create/button/?url='.$crunchifyURL.'&media='.$crunchifyThumbnail[0].'&description='.$crunchifyTitle; // Add sharing button at the end of page/page content $content .= '
'; $content .= '
SHARE ON
Twitter'; $content .= 'Facebook'; $content .= 'Google+'; $content .= 'Buffer'; $content .= 'Pin It'; $content .= 'Linked In'; $content .= 'Reddit'; $content .= 'Rss'; $content .= 'Stumble'; $content .= '
'; return $content; }else{ // if not a post/page then don't include sharing button return $content; } }; add_filter( 'the_content', 'crunchify_social_sharing_buttons');