Sharing Buttons Function

The wpssorrssb_get_sharing_buttons() function can include social sharing buttons anywhere in your theme template files. As an example, the following PHP code includes Facebook and X (Twitter) sharing buttons from within a loop, post, or page (the global $post->ID must be available):

<?php if ( function_exists( 'wpssorrssb_get_sharing_buttons' ) ) {

    echo wpssorrssb_get_sharing_buttons( array( 'facebook', 'twitter' ) );
} ?>

The sharing button names for the array can be:

  • email
  • facebook
  • linkedin
  • pinterest
  • pocket
  • reddit
  • tumblr
  • twitter
  • vk
  • whatsapp