• When you install a plugin and it inserts links to CSS and JS files into your HEAD section – where are these entries saved? I installed this ShareThis plugin and it’s in the head of every page on my site – ping their darn servers. I’d like to remove the reference from wherever it’s currently saved and add it to my single.php file.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The CSS and JS are written into the plugin and most likely inserted into the <head> via WordPress hooks. I’d have to look at the plugin source to tell you for sure, and I don’t have the time right now. 🙁

    Lines 116-127:

    function st_widget_head() {
    	$widget = get_option('st_widget');
    	if ($widget == '') {
    	}
    	else{
    		$widget = st_widget_add_wp_version($widget);
    		$widget = st_widget_fix_domain($widget);
    		$widget = preg_replace("/\&/", "&", $widget);
    	}
    
    	print($widget);
    }

    Try this in place of the above.

    function st_widget_head() {
    	if(is_single() || $query->is_single) {
    	$widget = get_option('st_widget');
    	if ($widget == '') {
    	}
    	else{
    		$widget = st_widget_add_wp_version($widget);
    		$widget = st_widget_fix_domain($widget);
    		$widget = preg_replace("/\&/", "&", $widget);
    	}
    	print($widget);
    	}
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Where are Global HEAD Includes Saved?’ is closed to new replies.