• Resolved Make carlos

    (@make-carlos)


    Hi
    I have added Shortcode in my theme file like single.php and working fine but if i want to disable that for particular post then i am checking checkbox: Disable standard sharing interfacefor this post but not working so in short that option for each post is not working with Shortcode.

    Please advice

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

    (@heateor)

    Hi,

    Shortcode is meant to bypass that setting. You can check for that setting yourself by querying the _heateor_sss_meta postmeta and looking for sharing and vertical_sharing indexes in the array.

    Thread Starter Make carlos

    (@make-carlos)

    <?php
    global $post;
    $postType = $post->post_type;
    $sharing_meta = get_post_meta( $post->ID, '_heateor_sss_meta', true );
    
    if ($sharing_meta['sharing'] != '1') {
        // Add your shortcode here if sharing is not equal to '1'
        echo do_shortcode('[your_shortcode_here]');
    }
    ?>

    You mean like this yes ? Please confirm

    Thanks
    Make

    Plugin Author Heateor Support

    (@heateor)

    Yes. You got it right.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable sharing icons not working with shortcode’ is closed to new replies.