Change the excerpt length

Change the excerpt length and control how much of your content is displayed

<?php
add_filter(
	'excerpt_length',
	function ( $length ) {
		// Number of words to display in the excerpt.
		return 40;
	},
	500
);

Post Comment