Support » Plugin: WPSocialite » Hide socialite on specific posts

  • Resolved jmzolezzi


    I’m placing socialite buttons on the theme itself, placing the following code:

    <?php echo $wpsocialite->wpsocialite_markup('small'); ?>

    Is there any way to hide that on specific posts ID? I’d like to hide the share buttons on some posts / pages, but the plugins that have this feature are not as good performance-wise as this one 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tom Morton



    Be sure to upgrade to the latest version. The new manual markup is <?php wpsocialite_markup(); ?>


    Let me think about how to best implement a “hiding” function. For now, you could simply use something like this:

    		$exclude_ids = array('1','60','62');
    		if(!in_array($post->ID, $exclude_ids)){

    This looks at the ID’s you have specified in $exclude_ids, then says “If the current $post->ID is not one of these, then display the wpsocialite_markup function.”

    Let me know if that helps.

    That works perfectly well Tom, thanks!

    Hi Tom

    Does that code go in functions.php? Any particular place? I’m using Genesis and looking to exclude from pages such as


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide socialite on specific posts’ is closed to new replies.