• Resolved Alisa Wong

    (@alisawong)


    Hello lovely people

    Appreciate your advice on the Olsen theme. How can I do the following?

    • Remove black social sharing buttons on post page? I am already using the Jetpack buttons.
    • Make the black social sharing buttons below each post on the home page become in this order: Facebook, Twitter, Pinterest, Whatsapp?
    • Thanks in advance for your help ??

    • This topic was modified 4 years, 9 months ago by Alisa Wong.
    • This topic was modified 4 years, 9 months ago by Alisa Wong.
    • This topic was modified 4 years, 9 months ago by Alisa Wong.
    • This topic was modified 4 years, 9 months ago by Alisa Wong.
    • This topic was modified 4 years, 9 months ago by Alisa Wong.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    1. add this
    .single .entry-utils{display:none;}
    in your custom CSS box under Customize->Additional CSS.
    2. Open part-social-sharing.php and replace everything with this

    <?php if( in_the_loop() ): ?>
    	<ul class="socials">
    		<?php
    			$thumb_id = get_post_thumbnail_id();
    
    			$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' );
    
    			$whatsapp = add_query_arg( array(
    				'text' => rawurlencode( get_permalink() ),
    			), 'whatsapp://send' );
    
    			$pinterest = add_query_arg( array(
    				'url'         => get_permalink(),
    				'description' => get_the_title(),
    				'media'       => olsen_get_image_src( get_post_thumbnail_id(), 'large' ),
    			), 'https://pinterest.com/pin/create/bookmarklet/' );
    		?>
    		<li><a href="<?php echo esc_url( $facebook ); ?>" <?php echo $target; ?> class="social-icon"><i class="fa fa-facebook"></i></a></li>
    		<li><a href="<?php echo esc_url( $twitter ); ?>" <?php echo $target; ?> class="social-icon"><i class="fa fa-twitter"></i></a></li>
    		<?php if ( ! empty( $thumb_id ) ): ?>
    			<li><a href="<?php echo esc_url( $pinterest ); ?>" <?php echo $target; ?> class="social-icon"><i class="fa fa-pinterest"></i></a></li>
    		<?php endif; ?>
    		<li><a href="<?php echo esc_url( $whatsapp ); ?>" <?php echo $target; ?> class="social-icon"><i class="fa fa-whatsapp"></i></a></li>
    
    	</ul>
    <?php endif; ?>
    

    Let me know if this worked for you.
    If you decide to proceed with this modification I would suggest you create a child theme, copy over the files you are editing and make the modifications there. This will allow your changes to survive future theme updates. If you directly edit the theme’s files, all changes will be lost once you update.

    Have a look at this guide to learn more about child themes and how to create one https://www.cssigniter.com/ignite/beginners-guide-child-themes/

    Thread Starter Alisa Wong

    (@alisawong)

    Hi Fotis

    Made some adjustments as per your guide on alisawong.com. Would update the original post with the revised domain, but can’t seem to do that anymore haha.

    Thanks for the speedy response, you’ve been a great help!

    @alisawong let me know how I can help out more!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change Social Sharing Icons’ is closed to new replies.