0

WordPress技巧(6): 替换”read more”

做以下的定义,修改第三行的代码,放到functions.php文件中,all will be ok!

<?php

$custom_more = "Continue reading this post";
add_filter( 'the_content_more_link', 'my_more_link', 10, 2 );

function my_more_link( $more_link, $more_link_text ) {
	return str_replace( $more_link_text, $custom_more, $more_link );
}
?>

Leave a Reply