Olsen Light Changing the 3 Share Buttons
-
Hi, my web page mylittlegingerone.com had 3 share buttons. I figured out how to remove google plus from it as an option, but I would like pinterest to be there. I am editing these in my part-social-sharing.php and this is the following I have currently for my theme to show Facebook and twitter (when i try to copy the code and just put PINTEREST in where it says Facebook and twitter, i will get the pinterest icon on my page but when you click it pinterest gives you an error because it will not pull an image)
<?php if( in_the_loop() ): ?>
<ul class=”socials”>
<?php
$thumb_id = get_post_thumbnail_id();$target = ”;
if ( get_theme_mod( ‘social_target’, 1 ) == 1 ) {
$target = ‘target=”_blank”‘;
}$facebook = add_query_arg( array(
‘u’ => get_permalink(),
), ‘https://www.facebook.com/sharer.php’ );$twitter = add_query_arg( array(
‘url’ => get_permalink(),
), ‘https://twitter.com/share’ );$gplus = add_query_arg( array(
‘url’ => get_permalink(),
), ‘https://plus.google.com/share’ );$pinterest = add_query_arg( array(
‘url’ => get_permalink(),
‘description’ => get_the_title(),
‘media’ => olsen_light_get_image_src( get_post_thumbnail_id(), ‘large’ ),
), ‘https://pinterest.com/pin/create/bookmarklet/’ );
?>- ” <?php echo $target; ?> class=”social-icon”><i class=”fa fa-facebook”></i>
- ” <?php echo $target; ?> class=”social-icon”><i class=”fa fa-twitter”></i>
- ” <?php echo $target; ?> class=”social-icon”><i class=”fa fa-pinterest”></i>
<?php if ( ! empty( $thumb_id ) ): ?>
<?php endif; ?>
<?php endif; ?>
- The topic ‘Olsen Light Changing the 3 Share Buttons’ is closed to new replies.