• Resolved stani66

    (@stani66)


    Dear Heateor Support,

    i am using the PHP Shortcode:
    <?php echo do_shortcode('[Sassy_Social_Share]') ?>

    But the Checkbox (Disable Standard Sharing interface on this post) does not work with this shortcode. Is it possible to fix it somehow?

    Thanks in advance.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Heateor Support

    (@heateor)

    That option disables the share icons appearing at webpages because of default placement options. Shortcode ignores this option.

    Thread Starter stani66

    (@stani66)

    Thank you for the reply.
    Is there any way to make it possible that the shortcode does not ignore the option?

    I would like to use the shortcode and be able to disable the plugin on certain pages with the provided checkbox.

    Plugin Author Heateor Support

    (@heateor)

    If you are placing shortcode using PHP code, you can check before placing it if social sharing has been disabled on that webpage.
    Following is an example:

    global $post;
    // post meta options by Sassy Social Share
    $sassy_share_meta = get_post_meta( $post->ID, '_heateor_sss_meta', true );
    // if standard share bar is not disabled in post meta options
    if ( ! isset( $sassy_share_meta['sharing'] ) ) {
    	// use shortcode for standard share bar
    	echo do_shortcode('[Sassy_Social_Share]');
    }
    // if floating share bar is not disabled in post meta options
    if ( ! isset( $sassy_share_meta['vertical_sharing'] ) ) {
    	// use shortcode for floating share bar
    	echo do_shortcode('[Sassy_Social_Share type="floating"]');
    }
    Thread Starter stani66

    (@stani66)

    Thank you very much for your effort, i appreciate it.

    It does work now if enable/disable the sharing interface in the options panel.
    But how can i disable sharing just on certain pages/posts via the checkbox
    “Disable Standard Sharing interface on this page/post”

    Do you have an idea?

    Thanks again in advance.

    Plugin Author Heateor Support

    (@heateor)

    The code posted in previous reply checks before using shortcode if “Disable Standard Sharing interface on this page/post” checkbox is enabled and doesn’t render social share bar if sharing is disabled at the page/post being visited by visitor.

    Thread Starter stani66

    (@stani66)

    Oh you were absolutly right, i made a mistake and didn’t copy the “global $post;”

    Now it works!! Thank you!

    One last question. How can i remove the style “font-weigt:bold” from the heateor_sss_sharing_title class. I tried to do it with CSS but it didn’t work, even with !important;

    <div class="heateor_sss_sharing_title" style="font-weight:bold">Share:</div>

    Plugin Author Heateor Support

    (@heateor)

    You can add following CSS in the “Custom CSS” option in the “Miscellaneous” section at plugin options page to make the title appear normal:
    div.heateor_sss_horizontal_sharing div{font-weight:normal!important}

    Thread Starter stani66

    (@stani66)

    worked ??

    Thank you for your effort again!

    Plugin Author Heateor Support

    (@heateor)

    You’re welcome ??
    If you could leave a review https://www.ads-software.com/support/plugin/sassy-social-share/reviews/, would be much appreciated.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Disable Sharing Checkbox with PHP Shortcode’ is closed to new replies.