Remove CSS style from a Plugin

Posted in: Newspaper
Post count: 1

Hi,

I installed the plugin Twitter Trends Widget, so far is working as expected. However it implements is own css style, do you know a easy way to disable it and instead use the default css which come from the theme?

From the plugin code I can see the following :

// Register style sheet.
add_action( ‘wp_enqueue_scripts’, ‘twitter_trends_widget_styles’ );

function twitter_trends_widget_styles() {
wp_register_style( ‘twitter-trends-widget’, plugins_url( ‘twitter-trends-widget/css/twitter_trends_widget.css’ ) );
wp_enqueue_style( ‘twitter-trends-widget’ );
}

And later:

<div class=”twitter-trends-widget clearfix” id=”<?php echo $args[‘widget_id’]; ?>”>
<div class=”hashcloud”>
<?php
for ($i=0; $i < $count; $i++){
echo ‘‘.$twitter[0][‘trends’][$i][‘name’].’‘.'<br>’;
}
?>
</div>
</div>
<?php }}

Post count: 9544

Simplest to just delete that section from plugin then try it.
Or, contact plugin author for a filter to use?

Simpler to just delete the code from plugin probably than go through task of de-registering it from a function when it is registered by plugin.

Theme has zero control over removing CSS from other plugins, only moving CSS to footer.

  • This reply was modified 8 years by simchris.
Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.