How to Change the Excerpt Length in GeneratePress Free and Pro Theme?

In this quick video tutorial I will show you how to increase/decrease excerpt length in GeneratePress free and pro theme.

PHP Code Snippet

if ( ! function_exists( 'wpf_custom_excerpt_length' ) ) {
	function wpf_custom_excerpt_length( $length ) {
		return 30;
	}
	add_filter( 'excerpt_length', 'wpf_custom_excerpt_length', 999 );
}

In the above snippet edit the return value to increase or decrease the excerpt length.

Leave a Comment