For playing our music on AirString Duo’s Website, I was choosing between two great WordPress plugins – Audio Player and Dewplayer. I finally went for the Audio Player because of the ability to customize its colours to match the website design.

In order to make it as easy as possible to add new songs and to always have the songs’ titles and the player in alignment, I decided to implement Audio Player into this great table managing plugin by Tobias Bäthge.

At first the Table refused to show the Audio Player. As suggested by Tobias, this is because the Audio Player plugin uses its own version of the shortcodes, not the regular WordPress shortcodes. However, there is an easy fix: to make it work simply add the following line of code to the file “functions.php” of your theme – right before that  ?> sign at the end.

add_filter( 'wp_table_reloaded_cell_content', array( &$AudioPlayer, 'processContent'
 ), 2 );

In case that didn’t do the trick you can try to replace that code with the following:

function insert_audio_player_into_wp_table_reloaded($source) {
  global $AudioPlayer;
  return $AudioPlayer->processContent($source);
}
add_filter( 'wp_table_reloaded_cell_content', 
'insert_audio_player_into_wp_table_reloaded' );

UPDATE – 9th March 2011 – The audio player seems to disappear after upgrading the WP-Table Reloaded Plugin to version 1.9.1. After downgrading the plugin back to 1.8. everything works perfectly!

Leave a Reply