Skip to content

Instantly share code, notes, and snippets.

@graylaurenm
Last active September 22, 2016 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graylaurenm/14325b818272cce8c387068e5a5ccee5 to your computer and use it in GitHub Desktop.
Save graylaurenm/14325b818272cce8c387068e5a5ccee5 to your computer and use it in GitHub Desktop.
Two Ways to Ensure the WordPress “Read More” Button Links to the Top of Your Post http://oncecoupled.com/2016/09/wordpress-read-more-top-of-post/
<?php // Don't paste this opening line!
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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment