Skip to content

Snippet: Enable URL Hash Update For Local Scroll Links

 * Enable URl hash update when clicking local scroll links
function myprefix_enable_local_scroll_hash_update( $array ) {
	$array['localScrollUpdateHash'] = true;
	return $array;
add_filter( 'wpex_localize_array', 'myprefix_enable_local_scroll_hash_update' );
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