Skip to content
Merlin Tools

functions.php snippets

The most common tweaks, ready to paste.

Genuinely free. No sign-up, no email, no limits, no cookies. We don't store the URL you analyse.

Code
<?php

// Remove the WordPress version number
remove_action( 'wp_head', 'wp_generator' );
add_filter( 'the_generator', '__return_empty_string' );

// Remove the emoji script
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );

What it's for

Every WordPress developer keeps pasting the same snippets into the theme's functions.php. Here you tick the ones you want and get a single clean, commented block for your child theme or a functionality plugin.

← All WordPress tools

Frequently asked questions

Where do I put this code?

In your child theme's functions.php, or in a small functionality plugin. Avoid editing the parent theme: an update would wipe your changes.