Jefferson Santos's Portfolio

Jefferson Santos's Portfolio

Freelancer Programmer

Vue.js Arrow Functions

Depending on the plugin and how many are active, this can cause slowness problems in WordPress. For those who like programming and want to compress the HTML file, here’s a hint on how to do this without installing any plugin.

Edit the functions.php file (that is inside your templates folder) and add the following line codes:


// minify html
function wp_html_minify_finish($html){
    return new WP_HTML_Minify($html);
// add to buffer the wp_html_minify_start
function wp_html_minify_start(){
add_action('get_header', 'wp_html_minify_start');

For do that, you need to get all code of the class “WP_HTML_Minify” on Github.

I hope you enjoyed.