By default, WordPress adds [...]
at the end of post excerpts. While it’s a small detail, it’s one of those things you might want to customize, especially if you’re building a theme or aiming for a polished content experience.
With just a few lines of code, you can easily replace it with something cleaner like ...
or even a custom link.
The Snippet
Here’s a simple way to change the excerpt “more” text to just an ellipsis (...)
:
function custom_excerpt_more($more) {
return '...';
}
add_filter('excerpt_more', 'custom_excerpt_more');
Where to Put It
Add this snippet to your theme’s functions.php file, or use a custom plugin if you’re organizing snippets separately.
What This Code Does
WordPress uses the excerpt_more filter to determine what text to display at the end of an excerpt (usually [...]
).
This function overrides that and returns '...'
instead.
Clean, minimal, and better for design consistency.