Archived topic
Add "3 dots" at the end of excerpts with no link
3 replies · Started by Mark on November 3, 2022
Hi,
How can I add 3 dots at the end of all archive excerpts, but without a link after. I can only seem to get the three dots if I check "Display read more as button" and add text in the box above.
Not having the three dots means that sentences randomly end and I don't think it's good to look at.
I don't seem to be able to apply a screenshot to show what I mean, but hopefully you get the gist.
Cheers,
Mark
Hi Mark,
Can you try adding this snippet?:
add_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' );
function tu_excerpt_metabox_more( $excerpt ) {
$output = $output = $excerpt . '...';
return $output;
}
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
That worked. Thanks :)
You're welcome Mark! :)