Skip to content

Instantly share code, notes, and snippets.

@pastorjacklamb
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pastorjacklamb/73d81bea3f474d6c6147 to your computer and use it in GitHub Desktop.
Save pastorjacklamb/73d81bea3f474d6c6147 to your computer and use it in GitHub Desktop.
used to add the sermon description to the sermon excerpt view. Place in theme functions.php file
add_action( 'init' , 'custom_add_and_remove' , 15);
function custom_add_and_remove() {
remove_action( 'sermon_excerpt', 'wpfc_sermon_excerpt' );
add_action( 'sermon_excerpt', 'custom_wpfc_sermon_excerpt' );
}
function custom_wpfc_sermon_excerpt() {
global $post;?>
<div class="wpfc_sermon_wrap cf">
<div class="wpfc_sermon_image">
<?php render_sermon_image('sermon_small'); ?>
</div>
<div class="wpfc_sermon_meta cf">
<p>
<?php
wpfc_sermon_date(get_option('date_format'), '<span class="sermon_date">', '</span> '); echo the_terms( $post->ID, 'wpfc_service_type', ' <span class="service_type">(', ' ', ')</span>');
?></p><p><?php
wpfc_sermon_meta('bible_passage', '<span class="bible_passage">'.__( 'Bible Text: ', 'sermon-manager'), '</span> | ');
echo the_terms( $post->ID, 'wpfc_preacher', '<span class="preacher_name">', ', ', '</span>');
echo the_terms( $post->ID, 'wpfc_sermon_series', '<p><span class="sermon_series">'.__( 'Series: ', 'sermon-manager'), ' ', '</span></p>' );
?>
</p>
</div>
<?php $sermonoptions = get_option('wpfc_options'); if ( isset($sermonoptions['archive_player']) == '1') { ?>
<div class="wpfc_sermon cf">
<?php wpfc_sermon_files(); ?>
</div>
<?php } ?>
<?php wpfc_sermon_description(); ?>
</div>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment