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 (...):

1
function custom_excerpt_more($more) {
2
return '...';
3
}
4
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.

Before you add any code snippets to your project, make sure you understand what the code does and back up your files just in case. Even small changes can have big effects, so test everything in a safe environment first!