Snippets: Alter Scroll to Top Speed

You can use the following code in your child theme's functions.php file to alter the back to top scroll speed. Simply change the 1000 value to your value of choice (speed in milliseconds).

add_filter( 'wpex_localize_array', function( $settings ) {
	$settings[ 'scrollTopSpeed' ] = 1000;
	return $settings;
} );

Snippet Type: PHP

Posted Under: Other

All PHP snippets should be added via a child theme's functions.php file.