How to remove “read more” / “continue reading” scrolling in WordPress

This is default functionality of wordpress that when you will click on read more or continue reading, it will show you complete content of that blog but it will scroll down to content you earlier read.So how to prevent this functionality,  its very easy.

In your theme folder and inside functions.php file write this code :-

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’ );

This code will resolve your problem.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s