Viewing 11 replies - 1 through 11 (of 11 total)
  • i have selected facebook & twitter

    but its showing all share buttons

    Thread Starter tripledm

    (@tripledm)

    On another post a user shared this;

    The plugin doesn’t work to me too, I temporaly applied this css:

    div.ssb-share.packslide .pinterest {
        display: none !important;
    }

    (insert classs of social that you want hide).

    I made small review in the code, and you can control which buttons will be displayed only if you choose flat, round or wide themes in plugin admin.

    With the other themes all buttons are displayed always.

    Thread Starter tripledm

    (@tripledm)

    I had to go find the PHP and remove any I could find related… my php skills suck so could not modify it like you have ;-(

    Go to the plugin folder, than in themes/icons-body.php file
    Open the icons-body.php file.
    Now search for this line of code:
    else if($ssb_share_content_themes=='bodyname')
    Under that line of code you have the code for the buttons:

    $ssb_share_icons.="
    <a ".$ssb_share_target_tab." class='fb' href='https://www.facebook.com/sharer/sharer.php?u=".ssb_share_get_url()."' ><span class='icon'></span><span class='body'>Share</span><span class='count'>".$ssb_count_fb."</span></a>
    <a ".$ssb_share_target_tab." class='twitter' href='https://twitter.com/intent/tweet?url=".ssb_share_get_url()."'><span class='icon'></span><span class='body'>Tweet</span><span class='count'>".$ssb_count_twitter."</span></a>
    <a ".$ssb_share_target_tab." class='pinterest' href='https://pinterest.com/pin/create/button/?url=".ssb_share_get_url()."&media=".ssb_share_get_image()."'><span class='icon'></span><span class='body'>PinIt!</span><span class='count'>".$ssb_count_pinterest."</span></a>
    <a ".$ssb_share_target_tab." class='gplus' href='https://plus.google.com/share?url=".ssb_share_get_url()."'><span class='icon'></span><span class='body'>Plus</span><span class='count'>".$ssb_count_gplus."</span></a>";

    Now depending on which theme you have chosen, you will have to find that code. In my case it is bodyname that is why you need to search for this code else if($ssb_share_content_themes=='bodyname')

    And in the buttons code just remove the links you do not need.

    That is all.

    Thread Starter tripledm

    (@tripledm)

    thank you thank you thank you!!! going to go test that as soon as I can!!

    Thanks, would be better to add the nofollow to each link?

    Adding nofollow to the button links will not remove them from the output.
    Best way to fix the issue is either to comment the link buttons that you don’t need or delete them entirely.

    Sorry, it’s not related to this issue. I’ve meant that it would be better for SEO, i guess

    Hello guys!

    There is a better, simplier and cleaner way to fix this.

    Go to the plugin folder in themes/icons-body.php file
    Open the icons-body.php file.
    Now search for this line of code (line 138)
    else if($ssb_share_content_themes=='flat' || $ssb_share_content_themes=='round'|| $ssb_share_content_themes=='wide')

    replace with this code
    else if($ssb_share_content_themes=='flat' || $ssb_share_content_themes=='round'|| $ssb_share_content_themes=='wide' || $ssb_share_content_themes=='bodyname' || $ssb_share_content_themes=='packslide' || $ssb_share_content_themes=='hexa')

    when the above else if ends….under this remains 5 “else if” for the others SSB styles…DELETE them and put that code

    else if($ssb_share_content_themes=='hover-left' || $ssb_share_content_themes=='hover-right')
    		{
    
    				if($ssb_social_sites['fb']=="fb")
    					{
    						$ssb_share_icons.="
    					<a ".$ssb_share_target_tab." class='fb' href='https://www.facebook.com/sharer/sharer.php?u=".ssb_share_get_url()."' ><span class='icon'></span><span class='count'>".$ssb_count_fb."</span></a><br/>";
    					}
    
    				if($ssb_social_sites['gplus']=="gplus")
    					{
    					$ssb_share_icons.= "<a ".$ssb_share_target_tab." class='gplus' href='https://plus.google.com/share?url=".ssb_share_get_url()."'><span class='icon'></span><span class='count'>".$ssb_count_gplus."</span></a><br/>";
    					}
    				if($ssb_social_sites['twitter']=="twitter")
    					{
    					$ssb_share_icons.= "<a ".$ssb_share_target_tab." class='twitter' href='https://twitter.com/intent/tweet?url=".ssb_share_get_url()."'><span class='icon'></span><span class='count'>".$ssb_count_twitter."</span></a><br/>";
    					}
    
    				if($ssb_social_sites['linkedin']=="linkedin")
    					{
    					$ssb_share_icons.= "<a ".$ssb_share_target_tab." class='linkedin' href='https://www.linkedin.com/shareArticle?mini=true&url=".ssb_share_get_url()."'><span class='icon'></span><span class='count'>".$ssb_count_linkedin."</span></a><br/>";
    					}
    				if($ssb_social_sites['pinterest']=="pinterest")
    					{
    					$ssb_share_icons.= "<a ".$ssb_share_target_tab." class='pinterest' href='https://pinterest.com/pin/create/button/?url=".ssb_share_get_url()."&media=".ssb_share_get_image()."'><span class='icon'></span><span class='count'>".$ssb_count_pinterest."</span></a><br/>";
    					}
    
    				if($ssb_social_sites['reddit']=="reddit")
    					{
    					$ssb_share_icons.= "<a ".$ssb_share_target_tab." class='reddit' href='https://www.reddit.com/submit?url=".ssb_share_get_url()."'><span class='icon'></span><span class='count'>".$ssb_count_reddit."</span></a><br/>";
    
    					}
    			}

    Don’t scary out…it’s only two replaces! ??

    Enjoy and if you want follow me on twitter @AntoniosKrinis

    Thank you, Good improvement!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘All social networks displayed irrespective of selection’ is closed to new replies.