Last active
September 22, 2016 00:45
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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