I put a custom css file in [custom.files]/custom/ (wp-content/uploads/civicrm/custom/) and it is not being read. I tested the same test entry in the civicrm/civicrm.css and it works there.

The entry for Resource URLs Custom CSS URL is [civicrm.files]/custom/

I cleared the cache for civicrm and Wordpress and it doesn't help.

I'm using WordPress 5.6 and civicrm 5.32.2.

  • Your setting needs to include the filename, e.g. [civicrm.files]/custom/myfile.css – Demerit Dec 28 '20 at 19:25
  • I tried that, but it doesn't work either at least for me. I checked again to make sure. I don't know what my issue is. But I tried using the css file in a WordPress child theme for our site and it works there and will not be overwritten by an update. So that is a simple solution for a simple problem now. – Gerald Rudolph Dec 28 '20 at 23:55
  • 1
    It might also be an access control issue for that particular folder since it can contain other sensitive info, e.g. .htaccess rules, or maybe something wordpress-specific I'm not aware of. If you look in the browser dev tools on the network tab you might see a 403 error. – Demerit Dec 29 '20 at 0:08
  • Yes, I do have a 403 error and the following is htaccess, which I don't understand. <Files "*"> # Apache 2.2 <IfModule !authz_core_module> Order allow,deny Deny from all </IfModule> # Apache 2.4+ <IfModule authz_core_module> Require all denied </IfModule> </Files> Would it hurt to just delete the .htaccess? – Gerald Rudolph Dec 30 '20 at 1:34
  • 1
    Yes, I am doing that now after giving up on the Resource Url approach. I am putting it in a style.css file in the WordPress child theme for the site and WordPress adds it. It won't get overwritten by updates there. I was trying not to mix the WordPress customization and civicrm customization, but it works and I can use it. I will look into using extensions. I just installed civicrm a few days ago and have a lot to learn. – Gerald Rudolph Dec 30 '20 at 2:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.