• MarshaS

    (@marshas)


    I’d like to use Simple Social Icons within a directory plugin, GeoDirectory.

    The GeoDirectory devs tell me it’s possible:

    it would be possible if the plugin offers a php snippet to add its icons.

    In that case instead of removing “geodir_social_sharing_buttons”, you would replace it with the function to call the icons of that plugin.

    However I don’t know if there is a php snippet for that plugin to output icons in a template. You’ll ahve to ask that to its developer.

    Is there a php snippet for Simple Social Icons?

    Thank you for your help.

    Marsha

    https://wordpress.org/plugins/simple-social-icons/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try this, it worked for me

    <?php
    echo do_shortcode('[social-icons]');
    ?>

    Forgot to mention, you need to add the Genesis Simple Share Shortcode to your functions.php for the above to work. So:

    1. Add this to your functions.php

    //* Genesis Simple Share Shortcode
    add_shortcode( 'social-icons', 'gss_shortcode' );
    function gss_shortcode() {
    	global $Genesis_Simple_Share;
    	$icons = '';
    
    	if ( function_exists( 'genesis_share_get_icon_output' ) ) {
    		$icons = genesis_share_get_icon_output( 'gss-shortcode', $Genesis_Simple_Share->icons );
    	}
    
    	return $icons;
    }

    Source/credit https://gist.github.com/nickcernis/7f28330b4ed2f2e22a2c

    2. Add the shortcode in your page/post, for example

    [social-icons]

    or

    <?php
    echo do_shortcode('[social-icons]');
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php snippet available for Simple Social Icons?’ is closed to new replies.