Link to home
Start Free TrialLog in
Avatar of rivkamak
rivkamakFlag for United States of America

asked on

wordpress not updating style.css in browser

I am trying to work updating css on a site in wordpress.
I am finding that even though I update the style.css its not updating on my site.
If I look in my resources it says it's loading style.css?ver=1.0
How can I get it to update in my browser?
I looked and I don't have any cache type plugins.
Avatar of OriNetworks
OriNetworks

You dont need any plugins for cache, the browser caches files by default. Clear the cache of your browser and you should get the new style.css if you mention what browser you are using i can also provide directions.  It might also help to use developer tools that come with your browser to see if the style.css that is loading. For example F12 developer tools while using internet explorer has a network tab that you can use to see if the style.css is loading a cached file (http code 304) or fresh from the server (http 200)
This is a common problem with Wordpress. There are numerous solutions like this one to combat the problem.

http://www.quickonlinetips.com/archives/2011/12/force-browser-css-refresh/
Avatar of rivkamak

ASKER

I'm using chrome and firefox.
even when I force a full refresh or open incognito,  i'm still seeing the old style sheet
I cleared my cache. I tried the idea from that file you included to tell it to put a different version number up there, but it's still showing ver=1.0 even though I put a different version number in my functions file

You can view my site here:
http://devorah.designalivesandbox.com/site2/
The words in large that say "our courses", is supposed to be in yellow, not black.
This style.css: http://devorah.designalivesandbox.com/site2/wp-content/themes/cw-business-lite/style.css

When I put that url in a browser that has never visited that site (no cache, no version number), it should give me the file straight from the server with the font color set to yellow. But it doesn't. The color is defined as #192836. The developer tools show code 200 for the style.css file on the site.

There has to be something more basic than a cache causing this.
Since i am most familiar with IE developer tools i can give you an example of how i would check if the element is using the style from styl.css.

Im developer tools use the first tab (dom explorer) to select an element that contains font that you think should be yellow. On the right side it will display the style inheritance. Check to make sure styl.css is listed and using the font-color property and value you expect. If it is crossed out, find the style above that is overwriting the property. If it is not listed, you may have to adjust you css selector in style.css
I am refering to the child theme that isn't updating
http://devorah.designalivesandbox.com/site2/wp-content/themes/cw-business-lite-child/style.css
this file shows up with custom css classes. But if you load the site itself, they don't show up.
I understand unfortunately im not in front of a computer with tools right now otherwise i would check for you. The same steps i have explained can be used to see if the child theme is being overwritten or even being evaluated at all
I can tell you that the style is not being overridden. Read my comment 28623033

This is the only definition listed and it's from style.css.

#features-two h3 {
    color: #192836;
    font-size: 39px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    width: 100%;
}
My point is not if my specific class is being overwritten or not. my point is that it is not loading the correct stylesheet into my browser.

when you load the stylesheet itself it shows version 1.1 in the comment.
if you load my website, the file css that is loading is 1.0

why is wordpress pulling an older version and not updating the cache?
Here's the problem.

This file has the color change. Note the folder cw-business-lite-child:
http://devorah.designalivesandbox.com/site2/wp-content/themes/cw-business-lite-child/style.css

This file is what is being called from the page. Folder cv-business-child:
http://devorah.designalivesandbox.com/site2/wp-content/themes/cv-business-child/style.css?ver=1.0
 
The latter style.css file has this import statement. Note the folder cw-business-lite:
@import url(../cw-business-lite/style.css);

http://devorah.designalivesandbox.com/site2/wp-content/themes/cw-business-lite/style.css

Does not have the color change.
ASKER CERTIFIED SOLUTION
Avatar of rivkamak
rivkamak
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No one else got the correct answer. I solved it myself.