Snippets: Trim Custom Excerpts

By default the Total theme will not trim custom excerpts as usually the purpose of a custom excerpt is for the user to control exactly what is shown for the excerpt. However, it is possible to enable the trimming of custom excerpts with a little code.

add_filter( 'wpex_excerpt_args', function( $args ) {
	$args['trim_custom_excerpts'] = true;
	return $args;
} );

Snippet Type: PHP

Posted Under: Other

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)