在摘录的末尾添加阅读更多链接
为此,请将以下代码放在 functions.php 中 :
function custom_excerpt_more($more) {
return '<a href="'. get_permalink($post->ID) . '">Read More</a>';
}
add_filter('excerpt_more', 'custom_excerpt_more');
结果应如下所示:
为此,请将以下代码放在 functions.php 中 :
function custom_excerpt_more($more) {
return '<a href="'. get_permalink($post->ID) . '">Read More</a>';
}
add_filter('excerpt_more', 'custom_excerpt_more');
结果应如下所示: