Instantly share code, notes, and snippets.

@bahiirwa /single.php
Last active Aug 25, 2017

What would you like to do?
<div class="post-desc">
<!--Edit Short CODE for the player-->
<?php if($post->post_type == 'sermons') {
$custom_fields = get_post_custom(get_the_ID());
$my_custom_field = $custom_fields['sermon_download'];
foreach ( $my_custom_field as $key => $cck_sermon_link ) {
<?php if (!empty($cck_sermon_link)) {
$var = apply_filters('the_content', "[embed]" . $cck_sermon_link . "[/embed]");
echo $var;}
<!--END Short CODE for the player-->

This comment has been minimized.


bahiirwa commented Jul 16, 2015

After much deliberation and anticipation to get help from a premium theme developer to send me a response to my query, I got frustrated like most of us would be. One starts to think of adding to the product that is not there own baby and also increase on the web developing community. I have to give credit where it is due as the heaven’s corner theme is well build with custom post types especially for the events and sermon posts. The key issue hear for the extra customization I wanted was to add an audio player that would cut across all platforms of web browsers without using

Increasing the WordPress queries
Making the website owner have more work
Add another custom field and code for the website.

Just Add this in the single.php page template to achieve the effect of a dynamically generated audio player. You can find more details on

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