WordPress.org

Ready to get started?Download WordPress

Forums

Audio Player
Won't Play - Substitue text for player (4 posts)

  1. mikevarela
    Member
    Posted 1 year ago #

    Have it installed. Plays fine in normal post, in the sidebar not so much. in fact it's not replacing the text with an instance. Can't figure it out.

    http://victorhuzvar.com/voice-over/

    I've tried both syntax - audio:full path --and -- audio:audio folder.

    here's the side bar code

    <div id="primary" class="sidebar one-third column">
    
    <?php
    	// we're looking at a static page.  Which one?
            if (is_page('Voice Over')) {
                 include(TEMPLATEPATH . '/sidebar_voiceover.php');
            } elseif (is_page('Contact')) {
                 include(TEMPLATEPATH . '/sidebar_contact.php');
            } elseif (is_page('Photo')) {
                 include(TEMPLATEPATH . '/sidebar_photo.php');
            } elseif (is_page('Home')) {
                 include(TEMPLATEPATH . '/sidebar_home.php');
            } elseif (is_page('Resume')) {
                 include(TEMPLATEPATH . '/sidebar_resume.php');
    
    	} else {
                  // catch-all for other pages
                 include(TEMPLATEPATH . '/sidebar.php');        }
    	?> 
    
    </div>

    and here's the code in the sidebar_voiceover.php file

    [audio:http://victorhuzvar.com/audio/VictorHuzvar_CommercialDemo_05072012.mp3]

    http://wordpress.org/extend/plugins/audio-player/

  2. ClaytonJames
    Member
    Posted 1 year ago #

    I think this is what you are after:

    "How do I place a player in the sidebar, header or footer?"

    <?php if (function_exists("insert_audio_player")) {
          insert_audio_player("[audio:http://www.domain.com/path/to/song.mp3]");
        } ?>

    Source

    I think there's also a companion Audio Player Widget to do the same/similar thing in the plugin repo. That might be worth a read too.

  3. mikevarela
    Member
    Posted 1 year ago #

    your the man, thanks

  4. ClaytonJames
    Member
    Posted 1 year ago #

    You're welcome.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic