Currently, it shows the list of sharing links in all the right places, except that it also includes them in the list of recent posts in the footer widget of my theme.
I don’t want them displayed in the footer list. It’s ugly there and pointless.
I could use CSS to hide them, by using something like
#footer .sharethis { display:hidden; }
and of course this hides the actual buttons but still takes up space because it makes room for them. I tried setting the height to zero but that didn’t work, the vertical space was still applied.
The ideal way to hide them is in the actual widget code. I tried the following:
if ( dynamic_sidebar( 'primary-widget-area' ) );
//return empty string
return $out;
}else{
//continue with the code
But this evaluates as false for all places where the plugin operates, including the bottom of posts where it should run.
How do I create my if statement to run only if the widget is operating in the footer area?
The topic ‘Ignoring the ShareThis plugin on a footer widget’ is closed to new replies.