Change the default excerpt ending in WordPress

By default, WordPress ends excerpts with “[…]” and some people do not like how that looks. So, here is how to change it to “…” or something of your own choice.

Add this to your theme’s functions.php and you are done:

/*  Excerpt ending
/* ------------------------------------ */
function alx_excerpt_more( $more ) {
	return '...';
add_filter( 'excerpt_more', 'alx_excerpt_more' );

I use & #46; instead of period signs because some web browsers tend to convert 3 period signs into something custom that may cause issues.

Written by:Alexander Agnarson

Leave a Reply

Your email address will not be published. Required fields are marked *