Hello,
I need help with the_excerpt filters. Here's the code I have right now in the functions.php
function new_excerpt_length($length) {
return 75;
}
add_filter('excerpt_length', 'new_excerpt_length');
function excerpt_read_more_link($output) {
global $post;
return $output . '<a href="'. get_permalink($post->ID) . '"> read more...</a>';
}
In my opinion it doesn't make sense to have [...] right after the 75 words and below a link to read more. I want the "read more" link instead of [...] and tried to add right after the code above:
function new_excerpt_more($more) {
return '<a href="'. get_permalink($post->ID) . '"> read more...</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
But turns out it's wrong. Any idea how to do it the right way? Thanks!