WordPress: замена [...] на read more в excerpt

Для того, чтобы в WordPress при использовании функции get_excerpt(); вместо [...] вывести read more, достаточно добавить такой вот код в файл темы functions.php ..
|
1 2 3 4 5 6 7 |
function new_excerpt_more($more) { global $post; return ' <a href="'. get_permalink($post->ID) . '">read more...</a>'; } add_filter('excerpt_more', 'new_excerpt_more'); |
Author: | Rating: / | Tags:

1 comment.
Write a comment