Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using a Child theme set up correctly. But I just cannot get changes in the Child theme style.css to be reflected in the site. Tried emptying the browser cache a million times and it doesn't work!

I'v created child template files and they overide the parent ones fine.

I have noticed in view sourse it puts a version number on the end of the style sheet like this:- style.css?ver=3.9.1 even though I have created no version!

In another site I created there is no versioning of the style sheet, so why is it being put in automatically when I don't want it set.

How can I force it to use the most up to date version of the Child style.css file and not version it?

Here's my site url:- http://www.peterswebservices.co.uk/

share|improve this question
1  
Browser caching is the most obvious possibility, but server caching can cause the same effect, and so can web "accelerators" that some ISPs and independent sites offer. –  s_ha_dum May 20 at 12:57
    
The version part you are seeing is just the current wordpress version that is automatically added by wordpress. No need to worry about that. –  Pieter Goosen May 20 at 13:00

2 Answers 2

Without seeing the site we can't help diagnose the issue but a common occurrence is the main theme css is having priority over the child css, you can overrule this by using the !important tag e.g.

#element {
 color:#fff !important;
}

The important tag marks that css as priority over any other css file with the same line of css

Let us know the url and if this helps

share|improve this answer
    
I don't think !important is the problem but here's my url:-peterswebservices.co.uk Also when I use the inspector on Google Chrome and drill down to the css file its showing a previous version without the latest changes. –  user1199360 May 20 at 13:06

I just had the same problem, and it turned out to be my new host having some kind of caching switched-on by default. I went to my control panel and flushed the cache, and it then correctly served the right style.css file.

The ?ver=3.9.1 turned out to be a red herring (at least for me). After I flushed the cache it still says ?ver=3.9.1, which is not found anywhere in my css file, but it's all working fine.

share|improve this answer
1  
The ?ver=3.9.1is automatically added by wordpress. This is the current version of wordpress and has nothing to do with your theme :-) –  Pieter Goosen Jul 11 at 6:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.