Viewing 1 replies (of 1 total)
  • Hi, apkajanu!

    Try to place this code into functions.php:

    //remove trash from source
    add_action('get_header', 'start_ob');
    add_action('wp_head', 'end_ob', 999);
    
    function start_ob() {
    	ob_start('remove_trash');
    }
    function end_ob() {
    	ob_end_flush();
    }
    
    function remove_trash($output) {
    
    	if (defined('CUSTOM_LOGIN_VERSION')) {
    		$target = '<meta name="generator" content="Custom Login v' . CUSTOM_LOGIN_VERSION . '" />';
    
    		$output = str_ireplace($target, '', $output);
    		$output = trim($output);
    		$output = preg_replace('/^[ \t]*[\r\n]+/m', '', $output);
    	}
    
    	return $output;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘How to remove Meta name generator’ is closed to new replies.