我使用的是摘录字段(而不是标记,因为摘录还可以用作引导段落)。我将“更多”链接改为箭头>。
function fabs_excerpt_more( $more ) {
return \' <a class="more" href="\'. get_permalink( get_the_ID() ) . \'">></a>\';
}
add_filter( \'excerpt_more\', \'fabs_excerpt_more\' );
但它只有在摘录被删减后才会出现。我也试过:function fabs_excerpt_more($output) {
global $post;
return $output . \'<a class="more" href="\'. get_permalink($post->ID) . \'">></a>\';
}
add_filter( \'the_excerpt\', \'fabs_excerpt_more\' );
在这种情况下,每个摘录都会显示>,但在结束p标记之后。有没有办法让它直接出现在最后一个单词之后?