这将删除<p>
标记,但通过将段落标记替换为<span>
类别:
function all_excerpts_get_more_link($post_excerpt) {
return \'\' . $post_excerpt . \'\' . \'<span class="readmore"><a href="\'. get_permalink($post->ID) . \'">\' . \'Continue Reading »\' . \'</span>\';
}
add_filter(\'wp_trim_excerpt\', \'all_excerpts_get_more_link\');