Remove more tag in WordPress
Default read more link of WordPress has a #more- tag link jump. I am the one who doesn’t like it so I use the following codes to remove all more tag. The following codes tested under WordPress 3.8.1
Step 1: Go your Dashboard and see which one is your active theme, generally the URL is http://YOUR-WORDPRESS/wp-admin/themes.php
2. Open the file of funciton.php and paste the following code at the bottom:
add_filter('the_content_more_link', 'wpprogramming_remove_more_parameter_in_more_link');
function wpprogramming_remove_more_parameter_in_more_link( $link ){
$matches_view = array();
$pattern = '%#more-(.*?)"%';
if( !preg_match($pattern, $link, $matches_view) ){
return false;
}
$link = str_replace( '#more-'.$matches_view[1], '', $link );
return( $link );
}

Post a Comment