WordPress.org

Ready to get started?Download WordPress

Forums

Audio Player
How to make Audio player being played on homepage only (4 posts)

  1. tungjacob
    Member
    Posted 2 years ago #

    Can anyone instruct me how to make the audio player automatically being played on homepage only. I insert the code into the footer script, and now it's being automatically played on every page.

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

  2. David
    Member
    Posted 2 years ago #

    @tungjacob can you post the code you are using to get the audio to play in the footer? I cannot even get that far!

  3. Dan
    Member
    Posted 2 years ago #

    @tungjacob - use a conditional tag so the function only fires on the homepage - if(is_front_page() should do the trick.

  4. tungjacob
    Member
    Posted 2 years ago #

    Thank you, the question has been solved by another friend developer

    Here is his code:

    <?php if (function_exists("insert_audio_player")) {
    if ( is_home() ) {
    // homepage code goes here
    insert_audio_player("[audio:http://link.mp3]");
    } else {
    // other pages code go here
    insert_audio_player("[audio:http://link2.mp3]");
    }
    } ?>

    Hope this helps another people who have the same problem

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic