So, I was recently having trouble when working on a new development website where I would add styles to the style.css file, but no matter how many times I’d try to clear my cache, it just wasn’t appearing! Now, the first time this happened, I assumed it was because I hadn’t switched to Development Mode in CloudFlare. That had happened before, and turning that on fixed it right up. So of course that was where I started. No luck. The changes to my CSS still weren’t showing up for me. In any browser. At all.
But never fear! I did find a solution! Now, I must preface this by saying that, while I’m a good coder, and I know quite a bit, I do not know why this particular fix worked for me.
In your functions.php file, where your style.css file is enqueued, you want to add
So, the line for this style would look something like this:
wp_enqueue_style( ‘stylesheet’, get_template_directory_uri() . ‘/style.css?r=’);
I hope this helps you out. And if you know why this works, or if there would be a better way, please don’t hesitate to leave a comment below.