-
Author
-
July 5, 2016 at 04:06 #128046simlimParticipant
When I make an update to the default style.css in my child theme (which is included automatically), what is the best way to update the version so my users can see it without the need to manually refresh the browser?
July 5, 2016 at 18:33 #128106RaduModeratorHi,
Child theme don’t need to be updated, only parent should be !
If you add some css to child theme/style.css after the file is updated the next visitor when accessing the page will be loaded with your latest css declarations.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 8, 2016 at 04:05 #128474simlimParticipantHi,
Not really, the style.css version always indicates the same version as the parent theme (e.g. style.css?v=4.08), this will remain cached unless the client clear the cache even if the stylesheet changed.
Anyway for the benefit of others, the solution is to basically avoid using the default style.css and include your own stylesheet where you can control the version through https://developer.wordpress.org/reference/functions/wp_enqueue_style/, unless you only change the default style when the parent theme upgrades.
July 8, 2016 at 15:15 #128503RaduModeratorHi,
From what i know links with parameters in URL like this : style.css?v=4.08 cannot be cached by default and it treated as dynamic resource anyway, you can open style.css file from child and change theme version from there.
The styles can be loaded also in wp-admin -> theme options -> general settings -> quick css
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.