• Resolved telwp

    (@telwp)


    This plugin is great, nice work.

    I’m using the ratings for specific pages, I’m displaying the stars via the PHP call in a theme template file.

    If you could help with these questions I’d be very happy indeed. I’m hoping the solutions will be simple remove_action functions.php entries!

    1. How can I remove all CSS header entries?

    Currently it’s adding the css.css file PLUS the STYLE tags in the header, I want to put that CSS in my theme’s .css file so would like to turn off your plugin’s style entries.

    2. How can I stop the plugin adding anything (CSS and JS) in the header?

    I will use an IF statement to load the scripts on pages that needs them, otherwise I don’t want the plugin adding unnecessary files that’ll slow down loading time.

    Thank you!

    http://wordpress.org/plugins/kk-star-ratings/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Kamal Khan

    (@bhittani)

    Comment out line numbers 690, 691 and 692 in index.php inside the plugin.
    So that it becomes

    //add_action('wp_enqueue_scripts', array($kkStarRatings_obj, 'js'));
    //add_action('wp_enqueue_scripts', array($kkStarRatings_obj, 'css'));
    //add_action('wp_head', array($kkStarRatings_obj, 'css_custom'));

    Plugin Contributor Kamal Khan

    (@bhittani)

    You can also dequeue the script files anywhere (maybe functions.php) as follows:

    wp_dequeue_script('bhittani_plugin_kksr_js');
    wp_dequeue_style('bhittani_plugin_kksr');

    Note that these methods work for wp3.1+

    Thread Starter telwp

    (@telwp)

    Thanks Kamal, I can work with those details. Very much appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove CSS in the header & remove all JS in header’ is closed to new replies.