标签越有过滤器,就可以通过下面的示例这样的小插件来增强它。
<?php
/**
* Plugin Name: br after more-Tag
* Description: Add content of var $extra_more after more-Tag
* Version: 0.0.1
*/
! defined( \'ABSPATH\' ) and exit;
add_filter( \'the_content_more_link\', \'custom_more_link\', 9999 );
function custom_more_link( $more_link ) {
$extra_more = \'<br>\'; // here add your break
return $more_link . $extra_more;
}
如果要用标记替换more标记,请使用一个小插件和
preg_replace
.
add_filter( \'the_content\', \'fb_more_link\' );
function fb_more_link( $content ) {
// only on single posts
if ( ! is_single() )
return $content;
// adsense code
$my_content = \'<br>\';
// replace more tag
$content = preg_replace(\'/<span id\\=\\"(more\\-\\d+)"><\\/span>/\', $my_content, $content);
return $content;
}