[Plugin: Sermon Manager] Display Video & Audio…not "elseif"
-
Right now Sermon Manger defaults to video, if you have both an audio version and a video version of the sermon uploaded. We want user to have the option of audio or video. I know it would require a lot more code work to be able to select one or the other so for now we just want to display both audio and video and they can choose which to play. I know it’s an issue with the ifelse statement, but don’t know what to change it to so it will show both. The code snippet is below. Thanks for any help!
// render files section function wpfc_sermon_files() { if ( get_wpfc_sermon_meta('sermon_video') ) { echo '<div id="wpfc_sermon-video" class="cf">'; echo do_shortcode( get_wpfc_sermon_meta('sermon_video')); echo '</div>'; } ifelse ( !get_wpfc_sermon_meta('sermon_video') && get_wpfc_sermon_meta('sermon_audio') ) { echo '<div id="wpfc_sermon-audio" class="cf">';?> <script> jQuery.noConflict(); jQuery(document).ready(function(){ jQuery('audio').mediaelementplayer(); }); </script> <?php echo '<audio controls="controls">'; echo '<source src="' . get_wpfc_sermon_meta('sermon_audio') . '" type="audio/mp3" />'; echo '</audio>'; echo '</div>'; }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[Plugin: Sermon Manager] Display Video & Audio…not "elseif"’ is closed to new replies.