• I did a little bit of custom modification to a some of the .php files in the 2017 WordPress template, got everything the way I liked it and when I looked at it a couple days later everything had switched back to its original state, I’m guessing this is some sort of security feature in action to prevent injection of malicious code, can anybody tell me more about what is happening? What this feature is called? Ways to work around it?

    I just modified site-branding.php and site-info.php to customize the header and make a more prominent button to link to #content

Viewing 2 replies - 1 through 2 (of 2 total)
  • It sounds like you updated the files directly and then an update for that theme was released.

    Any changes to themes and plugins are over-written when an update is installed. For plugins, you should only be updating things through actions and filters. For themes, you should use a child theme and set up the updated files on there. That way your changes won’t get over-writen when the theme is updated.

    Thread Starter terraformer

    (@terraformer)

    Thank you this is probably what happened

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

The topic ‘Custom code being removed automatically’ is closed to new replies.