Remove WordPress more link scroll down to content

If you want to get rid of the WordPress more link scroll, so that your more link doesn’t make a jump down to the continuing content, add this to your theme’s functions.php:

/*  Remove more link scroll
/* ------------------------------------ */
function alx_remove_more_link_scroll( $link ) {
	$link = preg_replace( '|#more-[0-9]+|', '', $link );
	return $link;
}
add_filter( 'the_content_more_link', 'alx_remove_more_link_scroll' );

Written by:Alexander Agnarson

2 Responses

  1. Max says:

    THX Dude

  2. I added this to the theme function page, what do I do after that? My problem is on my home page, links which are meant for certain content, is being included on the content below. I want to remove those additional links. How do I do this?

Leave a Reply

Your email address will not be published. Required fields are marked *