# Customize the theme with code snippets

Beside using a child theme to modify themes, you can also use plugins to achieve it. It is easier than using the child theme, but it has some limited. You should use plugins when your customizations are simple.

### Insert scripts to header and footer. <a href="#insert-scripts-to-header-and-footer" id="insert-scripts-to-header-and-footer"></a>

Sometimes you need to insert some kind of code to your website. It is most likley a web analytics code like Google Analytics or may be social media script or some CSS stylesheet or may be Custom fonts. You can use this plugin:

[Header and Footer Scripts](https://wordpress.org/plugins/header-and-footer-scripts/)

You can use this plugin to:

* To insert CSS and JavaScript codes to `<head>` or before `</body>`.
* To insert code to `<head>` of any single page, post, or custom post type.

{% hint style="danger" %}
This plugin can't be used to insert PHP codes.
{% endhint %}

### Add PHP code snippets <a href="#add-php-code-snippets" id="add-php-code-snippets"></a>

Most tutorials tell you to add snippet code to the `functions.php` file of a child theme (we do too), but if you don't want to do it, you can use this plugin:

[Code Snippets](https://wordpress.org/plugins/code-snippets/)

This plugin provides graphical interface, similar to the Plugins menu, for managing snippets. Snippets can can be activated and deactivated, just like plugins.
