Hi.
I’m trying to make the “read more” links from the home page go to the top of the individual posts instead of scrolling down to the part after the <!-- more -->
tag.
I used the code from this page: https://codex.wordpress.org/Customizing_the_Read_More
function remove_more_link_scroll( $link ) {
$link = preg_replace( '|#more-[0-9]+|', '', $link );
return $link;
}
add_filter( 'the_content_more_link', 'remove_more_link_scroll' );
But this isn’t working. The “read more” links (called “Read Show Notes” on my site) still scroll down to the part after the more tag. Any idea what might be going wrong?