The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. tungjacob
    Posted 4 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.


  2. David
    Posted 4 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
    Posted 4 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
    Posted 4 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
    } else {
    // other pages code go here
    } ?>

    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