The generate_smooth_scroll_elements
allow you to initiate smooth scroll on other element classes instead of just ones with the smooth-scroll
class.
Use the following PHP snippet to apply smooth scroll to all hash links:
add_filter( 'generate_smooth_scroll_elements', function( $elements ) { $elements[] = 'a[href*="#"]'; return $elements; } );