Viewing 1 replies (of 1 total)
  • Plugin Author Frank Goossens

    (@futtta)

    sure; in the function hooked to the filter you can easily add conditions to determine which CSS of JS has to be removed, something like this (untested, but you’ll get the idea) should work perfectly;

    add_filter('autoptimize_filter_css_removables','hugon_css_remove',10,0);
    function hugon_css_remove() {
    	if (strpos($_SERVER['REQUEST_URI'],'contact_me')!==false){
    		return "fonts.googleapis.com, emoji";
    	} else {
    		return "fonts.googleapis.com, emoji, contact.css";
    	}
    }

    frank

Viewing 1 replies (of 1 total)

The topic ‘Removing js and css’ is closed to new replies.