Body: <p>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.</p>
  <p>The entry for Resource URLs Custom CSS URL is [civicrm.files]/custom/</p>
  <p>I cleared the cache for civicrm and Wordpress and it doesn't help.</p>
  <p>I'm using WordPress 5.6 and civicrm 5.32.2.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-28T19:25:58.640Z
Comments.Text: Your setting needs to include the filename, e.g. [civicrm.files]/custom/myfile.css
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-28T23:55:34.273Z
Comments.Text: 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.
Comments.UserDisplayName: Gerald Rudolph
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-29T00:08:04.077Z
Comments.Text: 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.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-30T01:34:36.017Z
Comments.Text: 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?
Comments.UserDisplayName: Gerald Rudolph
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-30T01:51:53.987Z
Comments.Text: Yes it would hurt since it would make any civi uploads available to the public including attachments on activities, emails, and custom file fields. Does your css file need to be in civi's `custom` folder? Can you put it in a completely new folder you create under wordpress uploads that wouldn't need any access restrictions?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-30T02:13:42.683Z
Comments.Text: 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.
Comments.UserDisplayName: Gerald Rudolph
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-30T02:14:45.367Z
Comments.Text: Thanks for your help.
Comments.UserDisplayName: Gerald Rudolph
Tags: <wordpress><css><custom>
Title: Civicrm is not reading my custom css file (WordPress)
ThreadText: # Civicrm is not reading my custom css file (WordPress)
  
  (Asked by: username_0 on 2020-12-28)
  
  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.
  
  **Tags:** wordpress, css, custom
  
  > **Comments:**
  > **username_1**: Your setting needs to include the filename, e.g. [civicrm.files]/custom/myfile.css  
  > **username_0**: 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.  
  > **username_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.  
  > **username_0**: 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?  
  > **username_1**: Yes it would hurt since it would make any civi uploads available to the public including attachments on activities, emails, and custom file fields. Does your css file need to be in civi's `custom` folder? Can you put it in a completely new folder you create under wordpress uploads that wouldn't need any access restrictions?  
  > **username_0**: 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.  
  > **username_0**: Thanks for your help.  
  
  ---
  
  ## 0 answers
  
  