Title: Child Theme &amp; php files?
Last modified: August 19, 2016

---

# Child Theme & php files?

 *  [macunix](https://wordpress.org/support/users/macunix/)
 * (@macunix)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/child-theme-php-files/)
 * I read this article about child themes <[http://codex.wordpress.org/Child_Themes&gt](http://codex.wordpress.org/Child_Themes&gt);
   and have a question.
 * I have a twentyten-child theme. I would like to add google analytics code to 
   the header.php. RIght now have a copy of the header.php in the twentyten-child
   folder that has been modified with the code.
 * Is this the best way to handle this? Or can the code be injected similar to the
   way it was done with the functions.php example from the article?
 * TIA

Viewing 1 replies (of 1 total)

 *  Anonymous User
 * (@anonymized-3085)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/child-theme-php-files/#post-1842100)
 * [Function Reference/wp enqueue script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
   might help.
 * But in general yes things can be added via actions & filters if you want to avoid
   editing directly, even in a theme this can be useful.

Viewing 1 replies (of 1 total)

The topic ‘Child Theme & php files?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: Anonymous User
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/child-theme-php-files/#post-1842100)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
