diff --git a/includes/class-sm-shortcodes.php b/includes/class-sm-shortcodes.php index bae31da..6160524 100755 --- a/includes/class-sm-shortcodes.php +++ b/includes/class-sm-shortcodes.php @@ -922,6 +922,9 @@ function display_sermons( $atts = array() ) { $query = new WP_Query( $query_args ); + // Add query to the args. + $args['query'] = $query; + // Set image size. Deprecated. add_filter( 'wpfc_sermon_excerpt_sermon_image_size', function () use ( $args ) { return $args['image_size']; @@ -943,7 +946,14 @@ function display_sermons( $atts = array() ) { $query->the_post(); global $post; - echo apply_filters( 'sm_shortcode_sermons_single_output', '
' . wpfc_sermon_excerpt_v2( true, $args ) . '
', $post ); + // Allows preventing the call of wpfc_sermon_excerpt_v2(). + if ( apply_filters( 'sm_shortcode_output_override', false ) ) { + $output = ''; + } else { + $output = '
' . wpfc_sermon_excerpt_v2( true, $args ) . '
'; + } + + echo apply_filters( 'sm_shortcode_sermons_single_output', $output, $post, $args ); } ?>