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

  1. avil
    Posted 4 years 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


  2. depiction
    Posted 4 years 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

  • Digg Digg
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic