WordPress.org

Ready to get started?Download WordPress

Forums

Digg Digg
Digg Digg CSS Loading In All Pages When Post Page Only Selected For Floating bar (2 posts)

  1. avil
    Member
    Posted 1 year ago #

    I've observed that the Digg Digg CSS (diggdigg-style.css) is loading in all pages in the head section even when I selected only for the Post Page where I want the floating bar.

    Can I selectively load the CSS only in the single page using the following code.

    add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
    function my_deregister_styles() {
    if ( !is_single() ) {
    	wp_deregister_style( 'diggdigg-style' );
    }
    }

    I've tried the above code, but that isn't working can something similar or a tweak for the above code be suggested.
    - Thanks

    http://wordpress.org/extend/plugins/digg-digg/

  2. depiction
    Member
    Posted 1 year ago #

    I'm trying to do the same thing, but I've determined that DiggDigg doesn't use wp_enqueue_style, therefore de-registering it won't get rid of it.

    I think the only way is to remove it from the plugin's include/dd-helper.php file on line 32.

    add_action('wp_head', 'dd_output_css_to_html');

    However, I don't like changing a plugin's core files because it'll revert back anytime the plugin updates.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags