CodeHQ

Posts Tagged ‘Remove’

|

Preparing for Gutenberg

Thursday, February 8th, 2018

If you want to pre-disable Gutenberg for when it launches, install the following plugin, activate and untick the checkbox in the settings: https://wordpress.org/plugins/classic-editor/

If you also want to avoid the 5.0 update, you can always hide the update banner:

//Add to functions.php file to remove WordPress update notice 

function hide_update_notice() {
remove_action( 'admin_notices', 'update_nag', 3 );
}
add_action( 'admin_notices', 'hide_update_notice', 1 );

Tags: , , ,
Posted in WordPress | No Comments »

Remove script and style version numbers | WordPress

Wednesday, November 30th, 2016

Add this to functions.php

// Pick out the version number from scripts and styles
function remove_version_from_style_js( $src ) {
    if ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )
        $src = remove_query_arg( 'ver', $src );
    return $src;
}
add_filter( 'style_loader_src', 'remove_version_from_style_js');
add_filter( 'script_loader_src', 'remove_version_from_style_js');

Tags: , , , , , , ,
Posted in PHP, WordPress | No Comments »