Remove WP Version Number

Prevent robot scrapers from easily finding out which version of¬†WordPress you’re running.

Not a substitute for keeping WP updated, but a handy fallback for clients who may not.

/* remove WP version number */
if ( ! function_exists( 'dnlt_remove_wp_version' ) ) {
    add_filter( 'the_generator', 'dnlt_remove_wp_version' );

    function dnlt_remove_wp_version() {
        return '';


Leave a Reply

Your email address will not be published. Required fields are marked *

Skip to toolbar