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 &r=

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.

Subscribe and receive my FREE eBook


4 MISTAKES You’re Making on Your Website that are Costing You MONEY!

  • This field is for validation purposes and should be left unchanged.

The Author

Save

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Ready to chat about how ThePixelPixie can help?