Skip to content

Snippet: Remove the easing script

Important: The easing script is no longer loaded by default in the Total theme and there is an option located at Customize > General Theme Options > Local Scroll Links to enable it if you want to use it.

The jQuery easing script is loaded with the theme to provide a nicer animation for the back to scroll button or other local scroll effects on the site. However, the script can be removed and the theme will use default animations instead.

/**
 * Remove the easing script.
 *
 * @link https://totalwptheme.com/docs/snippets/remove-the-easing-script/
 */
add_action( 'wp_enqueue_scripts', function() {
    wp_deregister_script( 'wpex-easing' );
    wp_dequeue_script( 'wpex-easing' );
}, PHP_INT_MAX );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top