How to implement custom buttons into individual posts?
Here is a simple way to add custom sharing buttons (just place this code where you want your sharing buttons to be displayed): <?php $twitter_username=”your_twitter_username”; $shortURL = esc_url(get_permalink()); $shortTitle = esc_attr(get_the_title()); $imgURL = wp_get_attachment_url( get_post_thumbnail_id() ); $twitterURL = ‘https://twitter.com/intent/tweet?text=”.$shortTitle.”&url=”.$shortURL.”&via=”.$twitter_username; $facebookURL = “https://www.facebook.com/sharer/sharer.php?u=’.$shortURL; $googleURL = ‘https://plus.google.com/share?url=”.$shortURL; $pinURL = “http://pinterest.com/pin/create/button/?url=”.$shortURL.”&media=”.$imgURL.”&description=’.$shortTitle; ?> <a class=”facebook-btn” href=”https://wordpress.stackexchange.com/questions/191983/<?php echo $facebookURL; ?>” … Read more