• I am creating my own theme. A slight change in my style.css header and WP opens a message declaring an update is available. When I click on the update the latest version of the Twenty Twenty Four theme is installed and all my files are replaced and lost. This looks like a bug.

    So, I have the following questions:

    A. How can I update my theme and not have WP override it with another theme?

    B. How can I get rid of the update notification message?

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

    (@sterndata)

    Volunteer Forum Moderator

    Please show your style.css header

    Thread Starter thorsti

    (@thorsti)

    /*

    Theme Name: Tora

    Text Domain: Tora

    Version: 1.0

    Description: Responsive, Fast, Minimalistic, Stylish

    Tags: all around, Nice

    Author: Thor Stiefel

    Author URI: https://tora.is/

    */

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Do you recall what change(s) you made to style.css?

    It shouldn’t update unless it thinks it the Twenty Twenty Four theme are you are using an existing theme name. If you are creating the theme there wouldn’t be any updates unless you created the update. Are you starting from a blank theme or modifying the Twenty Twenty Four Theme.

    Moderator James Huff

    (@macmanx)

    A. How can I update my theme and not have WP override it with another theme?

    If you’re using a block theme, just modify the theme in the Site Editor, don’t touch any theme files: https://ww.wp.xz.cn/documentation/article/site-editor/

    If you’re not using a block theme, or you really feel the need to modify theme files, create a child theme: https://developer.ww.wp.xz.cn/themes/advanced-topics/child-themes/

    Thread Starter thorsti

    (@thorsti)

    Ok, I am starting a fresh. I delete all existing themes and write all my files. So here is what is so strange: After I delete theme files and add my style.css and modify it, WP brings up a message that says there is an update available. That update (if I check the update) install Twenty Twenty Four and overrides all my existing files and folders.

    Thread Starter thorsti

    (@thorsti)

    @steven Stern

    I made a change in the comment about theme version

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If you set the version to 99.9, it should stop offering to update, whatever else is going on.

    Thread Starter thorsti

    (@thorsti)

    Thanks Steven –

    Moderator James Huff

    (@macmanx)

    When you say you’re writing your own theme files with all other themes deleted, are you starting from scratch (as in writing into a previously blank file), or are you modifying existing files?

    If you’re modifying existing files, where did you get them from?

    Thread Starter thorsti

    (@thorsti)

    @macmanx I am adding empty php, css files etc. and writing my own code, i.e. not modifying existing theme. As I said – starting from scratch

    Moderator James Huff

    (@macmanx)

    What directory did you put the files in, specifically the full directory path to style.css starting with /wp-content/?

    Thread Starter thorsti

    (@thorsti)

    /wp-content/themes/my-theme/style.css

    Moderator James Huff

    (@macmanx)

    Excellent, with that location and the CSS header from earlier, it shouldn’t be replaced with any other theme going forward, assuming Theme Name, Text Domain, and /my-theme/ remain unique from anything found at https://ww.wp.xz.cn/themes/

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Update Themes’ is closed to new replies.