Support » Fixing WordPress » How to Make Audio Player Work in a Table ?!

  • Resolved Mike Hickcox

    (@mike-hickcox)


    I have custom code returning records from a table. One of the lines is an mp3 audio file. I have the line returning a perfectly good link to the audio, but can’t make the player appear.

    Does the audio shortcode not work when in a table? Is there a way to make it work?

    Or — how can I make a player appear with the audio link returned in the table?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Additional info —

    No additional plugins are involved here — no table plugin, no audio plugin.

    This test site is at: http://501.website/audio-programs/

    This is the code – one of the many iterations of it – that doesn’t work:

    // Audio Player
    echo ‘<tr style=”height:27px;”><td class=”label”>Listen:</td><td>
    [audio src=”http://MySite.org/HA-mp3/’ . $row[‘AudioLink’] . ‘”] </td></tr>’;

    Whew! Figured it out. It requires a do_shortcode element, like this:

    // Audio Player
    echo do_shortcode (‘<tr><td class=”label”>Listen:</td><td>[audio src=”http://soundtheology.org/HA-mp3/’ . $row[‘AudioLink’] . ‘”]</td></tr>’);

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to Make Audio Player Work in a Table ?!’ is closed to new replies.