• Hi all

    After on header.php adding;
    <head><embed autostart="true" height="0" loop="true" src="https://www.abc.com/blog/wp-content/uploads/2013/06/music.mp4" width="0"

    Backgound music works throughout all papes. Please advise how to delete background music on all pages making it only work on HOME?

    Thanks

    satimis

Viewing 2 replies - 1 through 2 (of 2 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Wrap the embed element in a conditional tag https://codex.www.ads-software.com/Conditional_Tags

    Thread Starter satimis

    (@satimis)

    @andrew,

    Thanks for your advice.

    I got it done by adding following lines after <head> on header.php

    <?php if (is_home()) {
    ?>
    <embed autostart="true" height="0" loop="true" src="src="https://www.abc.com/blog/wp-content/uploads/2013/06/music.mp4" width="0"/>
    <?php } ?>

    But there is still a minor problem. On browser run;
    https://www.abc.com
    background music starts to play. But after visiting other pages -> Home again

    background music won’t play. On URL box it shows;
    abc.com/?page_id=11

    How to get rid of “?page_id=11”? Any suggestion? Thanks

    Rgds
    satimis

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Background music’ is closed to new replies.