-
AuthorPosts
-
November 29, 2023 at 3:32 pm #1426714
Hello! My question is about a “style.css” file in the child theme. My site is fully working, but from time to time I need to make some changes in styles. When people visit my site, they don’t see changes because of their browser cache. So to see the changes, they have to do a hard refresh of the page with Ctrl+F5.
I want to add something like “/style.css?counter=<?php echo time(); ?>” in the template, but I can’t understand where the file is located.November 30, 2023 at 4:45 am #1426759Hey grabowski,
Thank you for the inquiry.
Instead of manually adding a counter or timestamp to the style.css file, consider installing a compression plugin or a cache plugin with a compression option. These plugins automatically generate a new file when there are changes to the site. You can also use the theme’s Enfold > Performance > File Compression settings and enable the Unique Timestamp Of Merged Files And WP Object Cache Bug option to append a timestamp to the compressed file
Best regards,
IsmaelNovember 30, 2023 at 10:20 am #1426778Thank you for the reply.
I´m afraid the suggested theme’s settings somehow don’t work for me. Also I don’t want to install another plugin.
Would you be so kind to simply tell me where can I manually add a timestamp to the style.css of the child theme?December 1, 2023 at 1:14 am #1426859Hi,
If you can’t use the theme’s Enfold > Performance > File Compression settings and enable the Unique Timestamp Of Merged Files And WP Object Cache Bug option to append a timestamp to the compressed file, then it could be a conflict with another plugin, try disabling all of your plugins. If that resolves the issue, reactivate each one individually until you find the cause.
Unfortunately I don’t believe there is a way to do what you ask without the risk of further conflicts.Best regards,
MikeDecember 1, 2023 at 10:53 am #1426877OK, thank you.
By the way, when I enable “compress CSS files”, I can’t edit my style.css from the child theme. Well, I edit it, but the changes do not apply. I tried this on different sites made with Enfold, and everywhere have the same problem. So I always have to disable the compression.December 1, 2023 at 4:07 pm #1426898Hi,
Thanks for the update. You would have to change something in the theme options in order for the resources to renew, please try that out.
Best regards,
RikardDecember 1, 2023 at 6:30 pm #1426908What exactly? Is there an “ideal” configuration?
December 2, 2023 at 10:37 am #1426943 -
AuthorPosts
- You must be logged in to reply to this topic.