Title: Custom code being removed automatically
Last modified: May 22, 2018

---

# Custom code being removed automatically

 *  [terraformer](https://wordpress.org/support/users/terraformer/)
 * (@terraformer)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/custom-code-being-removed-automatically/)
 * 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)

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/custom-code-being-removed-automatically/#post-10310806)
 * 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](https://codex.wordpress.org/Child_Themes)
   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](https://wordpress.org/support/users/terraformer/)
 * (@terraformer)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/custom-code-being-removed-automatically/#post-10311052)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [terraformer](https://wordpress.org/support/users/terraformer/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/custom-code-being-removed-automatically/#post-10311052)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
