0

I have a problem that has been plaguing my project from the beginning. It seems that old versions of style.css in my child theme are conflicting with the active version.

For example, in previous iterations, i had a class ".facet-sort" with a max-width of 150 px. When I delete the max-width rule but the page styling doesn't change. When I inspect the source code, I can still see that rule. Yet when I check the style.css page in my child theme folder, I can confirm that that rule has indeed been deleted.

Upon further inspection with the Firefox page inspector I found older versions of the stylesheet that are still active and being applied to the page (see images below).

It is not the result of a conflict with style.css in the parent theme since I can see that these are old classes from an earlier version of the stylesheet uploaded to my child theme.

I guess it must be the result of caching. Ive tried clearing all of the caches on the site. Ive also contacted the technical service of my hosting provider and confirmed with them that all caches have been flushed. But to no avail.

I would appreciate any advice you can offer.

Image from Firefox Page Inspector

Image from Firefox Inspector Stylesheets

5
  • Does this, this, this, and this help? Commented Apr 7, 2022 at 3:46
  • "I've tried clearing all of the caches on the site" - i'm not sure what this means. Have you cleared all the caches in your browser (nothing to do with the actual site). Also have you tried another device and/or another browser? Commented Apr 7, 2022 at 5:32
  • Thanks for replies. @vee, I read through that documentation. I found one recommendation that seems to have resolved the problem this morning. Cntrl + Shift + R cleared the cache and allows me to see the correct css. @A Haworth, I think answers your question as well. Commented Apr 7, 2022 at 15:11
  • Ive noticed that the css style sheet in my parent theme gets a unique version number: "...themes/ahtimeline-theme/dist/css/app.css?ver=0.4.26" whereas the css in my child theme displays does not seem to get a unique version number "...themes/ahtimeline-theme-child/style.css?ver=1.0.0" Ive also noticed that the parent theme css overrides the child theme css. Commented Apr 7, 2022 at 15:18
  • The style sheet is enqueud in the child theme functions.php with the following code: Commented Apr 7, 2022 at 15:22

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.