Snippets: Use Core WordPress get_the_excerpt Function for all Excerpts

By default Total uses a custom function to generate excerpts in various Total page builder modules and blog/post type entries. This is to allow for custom excerpt lengths across the site. However, if you are using a plugin to modify excerpts (such as custom excerpt translations) you may need to instead use the core WordPress function (which is unfortunately more limited). The following code alters the default WordPress excerpt function to use the native one in WordPress.

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

Snippet Type: PHP

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