social share in single.php

// Social Share Button
    function techbiz_social_sharing_buttons( ) {

        // Get page URL
        $URL = get_permalink();
        $Sitetitle = get_bloginfo('name'); 
      
        // Get page title
        $Title = str_replace( ' ', '%20', get_the_title());
      
      
        // Construct sharing URL without using any script
      
        $twitterURL = 'https://twitter.com/share?text='.esc_html( $Title ).'&url='.esc_url( $URL );
        $facebookURL = 'https://www.facebook.com/sharer/sharer.php?u='.esc_url( $URL );
        $pinteresturl = 'http://pinterest.com/pin/create/link/?url='.esc_url( $URL ).'&media='.esc_url(get_the_post_thumbnail_url()).'&description='.wp_kses_post(get_the_title());
        $linkedin = 'https://www.linkedin.com/shareArticle?mini=true&url='.esc_url( $URL ).'&title='.esc_html( $Title );
      
      
        // Add sharing button at the end of page/page content
      $content = '';
      
        $content .= '<li><a class="facebook" href="'.esc_url( $facebookURL ).'" target="_blank"><i class="fab fa-facebook-f"></i></a></li>';
        $content .= '<li><a class="twitter" href="'. esc_url( $twitterURL ) .'" target="_blank"><i class="fab fa-twitter"></i></a></li>';
        $content .= '<li><a class="instagram" href="'.esc_url( $pinteresturl ).'" target="_blank"><i class="fab fa-pinterest"></i></a></li>';
        $content .= '<li><a class="linkedin" href="'.esc_url( $linkedin ).'" target="_blank"><i class="fab fa-linkedin"></i></a></li>';
        return $content;
    };
Shopping Cart