• Hello,

    I am working on a site for a client, and my theme keeps resetting itself to its original version erasing the changes I have made.

    I have edited stylesheet.css and header.php, and when the theme resets these changes are erased and these files revert back to their original format.

    It’s really annoying and I keep having to go back and re-edit those files.

    I don’t know what to do and I’m at my wits end!

    Can anyone help?

Viewing 13 replies - 1 through 13 (of 13 total)
  • What theme are you using? Are new versions of the theme being put out by the theme’s author? Are you using a caching plugin? Is your host caching your site?

    Did you create a child theme? That’s what you should be doing instead of editing the theme files directly. This should prevent any changes in the parent theme from overriding your own changes.

    Please also post a link to the site if you need help with this?

    Thread Starter grob324

    (@grob324)

    Sorry I double posted this, I couldn’t find the original thread so I reposted.

    The site in question is http://www.thevillageofatlanta.com

    Now let me answer the questions:

    What theme are you using?

    I’m using the theme Spacious
    https://wordpress.org/themes/spacious

    Are new versions of the theme being put out by the theme’s author?

    There was one new version put out, but I haven’t upgraded.

    Are you using a caching plugin?

    No

    Is your host caching your site?

    No, I don’t believe so.

    Did you create a child theme?

    No, I did not create a child theme. Will doing so stop the resets from occuring?

    That’s not normal, and we can try to sort out what’s going on, but first just an aside – it’s not recommended to modify theme files directly because those changes WILL be lost when the theme is updated. So that’s the purpose of a child theme – see the link posted above.

    But what you describe shouldn’t be happening. Do other changes revert? How are you making changes in those files?

    Thread Starter grob324

    (@grob324)

    Changes to the actual content (pages and posts) of the site does not revert, but the changes I’ve made on the stylesheet and header, which are the only 2 files I’ve edited, revert. Also, I have custom font files uploaded to the theme folder and those are deleted when the site reverts.

    I am making the changes in the ‘Editor’ under ‘Appearance’ section.

    Mmm, strange – so how soon do they revert? Minutes, days?

    You should try creating a child theme. As mentioned previously, a child theme should prevent your changes from being lost. You would create your own style.css file in your child theme folder, and then make a copy of the header.php file from the parent theme’s header.php file into the child theme folder, making whatever changes are needed in the copy.

    Note, though, that the theme does have a Custom CSS option (go to Theme Options, click the Design tab, and scroll down to the bottom), so you don’t even need to add anything in your child theme’s style.css file, you can just add your own CSS in that option field. If you are trying to override an existing rule, just copy the rule (selector and the properties that you are changing) into the Custom CSS option field, and adjust the values to whatever you wish.

    Thread Starter grob324

    (@grob324)

    It seems to be reverting every 4-6 hours.

    I have went ahead and created a child theme using the instructions in the link above.

    I am going to wait and see if that stops it from reverting.

    It seems to be reverting every 4-6 hours.

    Really sounds like something on the hosting – I’d be kinda surprised if the child theme solves it – but who knows :)! Fingers crossed.

    You could also try deactivating your plugins just in case any are doing something strange.

    Thread Starter grob324

    (@grob324)

    Ok,

    So the child theme mostly fixed the problem. But the parent stylesheet continues to reset itself. Which is causing an issue with some edits I’ve made to the rule for tables.

    Now the tables are reverting back to default and not displaying correctly.

    SO the rule is edited in the child theme’s style.css but the parent style.css is resetting and overriding those changes in the child theme.

    Any ideas as to what I should try next?

    SO the rule is edited in the child theme’s style.css but the parent style.css is resetting and overriding those changes in the child theme.

    Can you give an example of a rule in your child theme’s stylesheet that is being overridden by the parent? As long as you have a rule with an identical selector in your child theme’s style.css file, then your child theme’s rule should override the parent theme’s rule, so it shouldn’t matter if the parent theme’s stylesheet gets reset. For example, if the parent theme has a rule which looks like this:

    .site-title a {
       color: #000;
    }

    And you want to change the color to blue, you would write a rule in your child theme which looks like this:

    .site-title a {
       color: #00f;
    }

    By the way, you don’t need to copy over all of the parent theme’s CSS into your child theme’s stylesheet, just the rules you are adding which are new or the rules which are intended to override a parent theme’s rule.

    Thread Starter grob324

    (@grob324)

    Thanks Bruin,

    Upon further investigation the table issue was caused by me not using the ‘border’ tag correctly, and had nothing to do with the stylesheet.

    As far as I can tell the parent stylesheet has been reset, but the child theme has not and its overriding the parent as intended.

    I’m going to continue to monitor the site to see if it changes back, but for now everything is working correctly.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Theme keeps resetting itself to original version’ is closed to new replies.