HostOnNet Blog

How to remove ‘Continue Reading’ from wordpress

continue-reading

For removing ‘Continue Reading’ link from wordpress TwentyTen theme, Edit functions.php in your theme folder and add the following code.

remove_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );
remove_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' );

function sbt_continue_reading_link() {
	return '';
}

function sbt_auto_excerpt_more( $more ) {
	return '' . sbt_continue_reading_link();
}
add_filter( 'excerpt_more', 'sbt_auto_excerpt_more' );

function sbt_custom_excerpt_more( $output ) {
	if ( has_excerpt() && ! is_attachment() ) {
		$output .= sbt_continue_reading_link();
	}
	return $output;
}
add_filter( 'get_the_excerpt', 'sbt_custom_excerpt_more' );


About hostonnet2

Bootstrap and Android LOVER.

I’ve been creating things for the web for over 10 years, from the period of flash and table based layout web sites till mobile and tab friendly web sites.

Posted in Wordpress