Skip to content

Instantly share code, notes, and snippets.

@bodiequirk
Created November 15, 2017 20:46
Show Gist options
  • Save bodiequirk/814919b7d2539c8eab0ec04c2c74b239 to your computer and use it in GitHub Desktop.
Save bodiequirk/814919b7d2539c8eab0ec04c2c74b239 to your computer and use it in GitHub Desktop.
Sermon Manager Shortcodes for Beaver Themer
// Allows the audio player to be added on single sermons via the [themer_sermon_audio] shortcode
add_shortcode('themer_sermon_audio', function( $atts, $content = null ){
return wpfc_render_audio( get_wpfc_sermon_meta( 'sermon_audio' ) );
});
// Allows the audio player to be added on single sermons via the [themer_sermon_slides] shortcode
add_shortcode('themer_sermon_slides', function( $atts, $content = null ){
return get_wpfc_sermon_meta( 'sermon_video' );
});
@ctam19
Copy link

ctam19 commented Jan 4, 2019

Based on your code, I figured out how to embed a video if it is a youtube link.

// Allows the audio player to be added on single sermons via the [themer_sermon_video] shortcode 
add_shortcode('themer_sermon_video', function( $atts, $content = null ){
        return wpfc_render_video( get_wpfc_sermon_meta( 'sermon_video_link') );
}); 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment