Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Displaying Sermon Manager meta in WP Show Posts? Reply To: Displaying Sermon Manager meta in WP Show Posts?

#13881
Bodie J
Participant

Nevermind, I got it!! Thanks so much Tom. I didn’t realize that code was ready to go, I at first glance thought I had to write a function name, but no! function() was to be left as is. This is so great, thanks again.

add_action( 'wpsp_after_content', function() {
    ?>
        <div class="wpfc-sermon-footer">
				<?php if ( has_term( '', 'wpfc_preacher', $post->ID ) ) : ?>
					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-preacher">
						<?php
						echo apply_filters( 'sermon-images-list-the-terms', '', // phpcs:ignore
							array(
								'taxonomy'     => 'wpfc_preacher',
								'after'        => '',
								'after_image'  => '',
								'before'       => '',
								'before_image' => '',
							)
						);
						?>
						<span class="wpfc-sermon-meta-prefix">
							<?php echo sm_get_taxonomy_field( 'wpfc_preacher', 'singular_name' ); ?>
							:</span>
						<span class="wpfc-sermon-meta-text"><?php the_terms( $post->ID, 'wpfc_preacher' ); ?></span>
					</div>
				<?php endif; ?>
				<?php if ( get_post_meta( $post->ID, 'bible_passage', true ) ) : ?>
					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-passage">
						<span class="wpfc-sermon-meta-prefix">
							<?php echo __( 'Passage', 'sermon-manager-for-wordpress' ); ?>:</span>
						<span class="wpfc-sermon-meta-text"><?php wpfc_sermon_meta( 'bible_passage' ); ?></span>
					</div>
				<?php endif; ?>
				<?php if ( has_term( '', 'wpfc_service_type', $post->ID ) ) : ?>
					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-service">
						<span class="wpfc-sermon-meta-prefix">
							<?php echo sm_get_taxonomy_field( 'wpfc_service_type', 'singular_name' ); ?>:</span>
						<span class="wpfc-sermon-meta-text"><?php the_terms( $post->ID, 'wpfc_service_type' ); ?></span>
					</div>
				<?php endif; ?>
			</div>
    <?php
} );