• Hi all!

    I hope you’re safe and well!

    I’m working on a site with a custom theme, based on the Underscores theme. There are no other themes installed, but when I run a core WordPress update (5.3 to 5.4) the stylesheet in the custom theme’s directory is overwritten and replaced with the Twenty Nineteen stylesheet.

    When I look at the installed theme from the dashboard, it says TwentyNineteen/mythemename. Before the update, it was just mythemename.

    I’ve tried installing a default theme and reinstalling the core update to see if this fixes the issue but no luck.

    Does anybody know why the stylesheet is being overwritten?

    Thanks in advance,

    Nathan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What’s the directory name in which you installed the _s based theme and what did you use as the Theme URI in style.css?

    >> no other themes << Note: You should always have a fallback theme available.

    Thread Starter nathanfld

    (@nathanfld)

    Hi Steve,

    Thanks for the quick reply! I checked style.css – there was no information there at all! I’m guessing the CSS preprocessor removed the comments when compiling the stylesheet.

    I’ve put the theme details back in and tested the core update again. Unfortunately, the file is still being overwritten. I’ve installed Twenty Twenty and Twenty Nineteen as fallback themes.

    The theme lives in /wp-content/themes/ccp/. The URI is the primary web domain for the company – for example, https://companyname.com

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Just a note: if you give a theme the same name as an existing wp.org theme, an update to that theme will overwrite yours. However, there does not appear to be a “ccp” theme in the WP repository. The comments at the top of a theme *must* be there; don’t remove them.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress core updates overwriting custom theme styles’ is closed to new replies.