Snippets: Disable URL Hash Update For Local Scroll Links

Important: We have released an extension plugin so you don't have to add any code to your child theme for this.

 * Disable hash update when clicking local scroll links
 * @link 1.6.0
function myprefix_disable_local_scroll_hash_update( $array ) {
	$array['localScrollUpdateHash'] = false;
	return $array;
add_filter( 'wpex_localize_array', 'myprefix_disable_local_scroll_hash_update' );

Snippet Type: PHP

Posted Under: Other

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)