I currently have a custom CSS file specified in Settings > Resource URLS. In this CSS file I override some civicrm.css styles to make the CiviCRM admin screens look a little more like the Wordpress admin area. However, I would like to disable this file when viewing frontend pages e.g. contribution pages.
I've tried the basic usage of the Wordpress wp_dequeue_script option but I can't find what the handle is for this file, so this doesn't work.
Note: I have successfully disabled the standard civicrm.css on my front end pages with this code in functions.php suggested by another user:
function rs_remove_civicrm_styles() {
global $civicrm_root;
if (empty($civicrm_root)) {
return;
}
$civicrm_css = CRM_Core_Resources::singleton()->getUrl('civicrm', 'css/civicrm.css', TRUE);
CRM_Core_Region::instance('html-header')->update($civicrm_css, array('disabled' => TRUE));
}
But I'm not sure same method can be used for the custom css file?