Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Genesis Simple Share Shortcode
// Adds a [social-icons] shortcode to output Genesis Simple Share icons in posts
// Add the code below to your active theme's functions.php file,
// or use in a site-specific plugin.
// The shortcode takes no attributes; change your icon settings via Genesis → Simple Share.
add_shortcode( 'social-icons', 'gss_shortcode' );
function gss_shortcode() {
global $genesis_simple_share;
$icons = '';
if ( function_exists( 'genesis_share_get_icon_output' ) ) {
$location = uniqid( 'gss-shortcode-' );
$icons = genesis_share_get_icon_output( $location, $genesis_simple_share->icons );
return $icons;
Copy link

KramarzGIT commented Apr 16, 2020

I have tried to use this to shows icons on wigetized home page.. they don't show... source code shows them there but there's no visual output.
Any ideas?

Copy link

ananich commented Sep 6, 2020

@KramazGIT, it seems that it will only work if you are using static home page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment