Copy and save this code to archive-sermon.php, change https://yoursite.com to your domain and upload to your theme’s folder. I think this code will work for you. If it don’t please tell me.
Have a nice day
<?php
/**
* This is the template for displaying archive sermons.
*
* @package Builder Block Church
* @subpackage Templates
* @author Justin Kopepasah
* @since 1.1.0
*
* DO NOT EDIT THIS TEMPLATE.
*
* If you wish to use a custom template, copy this template over
* to your theme and rename the template to archive-sermon.php.
*/
function render_content() {
global $post;
?>
<?php if ( have_posts() ) : ?>
<div class="loop sermon-archive">
<div class="loop-header">
<h4 class="loop-title"><?php _e( 'Sermons', 'it-l10n-builder-block-church' ); ?></h4>
</div>
<div class="loop-content">
<?php while ( have_posts() ) : the_post(); ?>
<?php $audio = get_children( array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'audio' ) ); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
<div class="entry-header">
<h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<span class="sermon-date"><?php printf( __( ' Posted on %s', 'it-l10n-builder-block-church' ), get_the_date() ); ?><span>
<span class="sermon-tags"><?php printf( __( ' in %s', 'it-l10n-builder-block-church' ), get_the_term_list( $post->ID, 'sermon_tag', '', ', ', '' ) ); ?></span>
<script language='javascript' type='text/javascript' src='https://yoursite.com/wp-content/plugins/auto-attachments/includes/jw/swfobject.js'></script>
<ul>
<?php if ( ! empty( $audio ) ) : ?>
<?php _e( '| MP3', 'it-l10n-builder-block-church' ); ?><?php if ( count( $audio ) >= 2 ) { echo 's'; } else { echo ' -'; } ?>
<?php foreach ( $audio as $attachment_id => $attachment ) : ?>
<li>
<div id='mediaspace-<?php echo wp_get_attachment_link( $attachment_id, '' , false, false, ' '); ?>'></div>
<script type='text/javascript'>
var so = new SWFObject('https://yoursite.com/wp-content/plugins/auto-attachments/includes/jw/player.swf','ply','470','24','9','#000000');
so.addParam('allowfullscreen','false');
so.addParam('allowscriptaccess','always');";
so.addParam('wmode','opaque');";
so.addVariable('file','<?php echo wp_get_attachment_url( $attachment_id, 'full' ); ?>');";
so.write('mediaspace-<?php echo wp_get_attachment_link( $attachment_id, '' , false, false, ' '); ?>');";
</script>
<span class='mp3title'><?php echo $attachment->post_title; ?></span>";
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
<div class="entry-content">
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail( 'sermon-archive', array( 'class' => 'alignright' ) ); ?>
<?php endif; ?>
<?php the_content( __( 'View Sermon →', 'it-l10n-builder-block-church' ) ); ?>
</div>
</div>
<?php comments_template(); // include comments template ?>
<?php endwhile; // end of one post ?>
</div>
<div class="loop-footer">
<!-- Previous/Next page navigation -->
<div class="loop-utility clearfix">
<div class="alignleft"><?php previous_posts_link( __( '? Previous Sermon', 'it-l10n-builder-block-church' ) ); ?></div>
<div class="alignright"><?php next_posts_link( __( 'Next Sermon ?', 'it-l10n-builder-block-church' ) ); ?></div>
</div>
</div>
</div>
<?php else : // do not delete ?>
<?php do_action( 'builder_template_show_not_found' ); ?>
<?php endif; // do not delete ?>
<?php
}
add_action( 'builder_layout_engine_render_content', 'render_content' );
do_action( 'builder_layout_engine_render', basename( __FILE__ ) );