• Resolved wordsetc

    (@wordsetc)


    Friday I logged in to do some work on my website and saw the theme needed updating, so I did it. Unfortunately, that update zeroed the theme back to the original upload of the theme and all my CSS and other modifications were GONE!! It even modified the major layout of the theme (right-side navigation).

    Luckily I had my previous CSS file on my computer, so I uploaded, though there are still some problems I’m going to have to edit to get it back to what I had because evidently other theme files were also edited. Then, I noticed that the theme, again, said it needed updating! Come to find out, every time I update a file, it will say the theme needs updating, and, if I do that, it just goes back to zero with all my edits gone again!!

    Sure, I can just ignore the message that the theme needs updating, but what if there’s a security update? How will I know? Also, since it’s changing all the CSS and other files, what a pain to have to re-do all my work!

    I can’t keep using this theme if the updates will continue to change the theme php and CSS files.

    Tina

Viewing 4 replies - 1 through 4 (of 4 total)
  • For as long as I can remember, at least, WordPress theme updates have always reverted all the theme’s files, which is why it’s recommended to use a child theme if you’ll be making extensive customizations to a theme.

    Thread Starter wordsetc

    (@wordsetc)

    Hum, I’ve used WordPress for many years and have never had a theme reload over my edited files.

    So, now I’m trying to build a child theme based on that link you posted, and I can’t get it to work. From the directions, I have no idea what parts of the functions.php file need to be edited to my theme/folder/etc. names and what don’t.

    I can build the folder, and my edited footer.php file works fine, but I can’t get it to call the CSS file properly.

    Your theme loads its stylesheet in a non-standard way, and so the Codex method of creating a child theme will not work, unfortunately. Try this code instead:

    <?php
    function northern_clouds_child_enqueue_styles() {
      wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
      wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( 'parent-style' ),
        wp_get_theme()->get('Version')
      );
    }
    add_action( 'wp_print_styles', 'northern_clouds_child_enqueue_styles', 20 );
    Thread Starter wordsetc

    (@wordsetc)

    Thank you SO much!!! That code worked just fine and now I have a child theme!!!!!!!

    Thanks again,
    Tina

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Update zeroed all my theme modifications’ is closed to new replies.