This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This shortcode will show the buttons you have actived through sharing settings. | |
// Add this shortcode function to functions.php file in your theme folder | |
function wpcodex_sharedaddy_shortcode() { | |
return ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'sharedaddy' ) ) ? sharing_display() : ''; | |
} | |
add_shortcode( 'sharedaddy_buttons', 'wpcodex_sharedaddy_shortcode' ); | |
// Add this shortcode to your theme where ever you want to show the sharing buttons |