Support » Plugin: Add Twitter, Facebook Like, Google plus one Social share » Disable output for defined posts (compatibility issues)

  • Hello, in order to disable the plugin on posts/pages that may cause problem (serious issue with OptimizePress: the plugin practically loads for every element of the OptimizePress Page causing the speed to plump – dozen of social calls), the following lines should be added:


    if (in_array(get_the_id(), $option['donot_show_in'])){
      // disable for defined posts
      return $content;


    $option['donot_show_in'] = explode(',',str_replace(' ','',$_POST['twitter_facebook_share_donot_show_in'])); // it can be better  done


    $out .= '</td></tr>
    			<tr><td valign="top" style="width:130px;">'.__("Do not show buttons in these posts", 'menu-test' ).':</td>
    			<td style="padding-bottom:20px;">
    			<input type="text" name="twitter_facebook_share_donot_show_in" value="'.(is_array($option['donot_show_in'])?implode(',',$option['donot_show_in']):'').'" size="30">
    		 <span class="description">'.__("Comma separated ID lists", 'menu-test' ).'</span>

  • The topic ‘Disable output for defined posts (compatibility issues)’ is closed to new replies.