Ready to get started?Download WordPress


Add music to background on home page (9 posts)

  1. Lizbit
    Posted 4 years ago #

    Can't remember how to add music to the background of my home page. I have a really nice song I'd like to have play when my site loads. Thanks in advance!

  2. Samuel B
    Posted 4 years ago #

    Integrating the music file as background of the site is easy and consists of two separate steps: providing the file and modify HTML code of your site. The format of the audio file can be any standard: MP3, WMA, MIDI, etc.
    1). Providing file:
    This means, the file should have an Internet address and to be located on the Web server, allowing direct opening. What you need is called URL - Internet address where it is located.
    2). Modifying the HTML code on your site:
    Edit HTML code. Immediately after the tag < head > insert the following code:
    HTML Code:

    <embed autostart="true" height="0" loop="true" src="URL://music-file" width="0"/>

    sorry can't find the ref for this
    quick drop in :>)

  3. celiapgt
    Posted 4 years ago #

    Thanks, samboll; your tip was just what I need.

  4. celiapgt
    Posted 4 years ago #

    This topic is resolved, at least to me.

  5. GIPPE
    Posted 4 years ago #

    I attempted to follow Samboll's instructions, using the following sampling for testing purposes; the music clip is saved in my WordPress Admin Media Library, but was unsuccessful...

    <head><embed autostart="true" height="0" loop="true" src="http://www.gippe.com/wp-content/uploads/2010/03/Web-Site-Intro.mp3" width="0"/>
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php if (is_home()) {
    You'll note that you can copy and paste the URL to successfully play a 29 second clip, but where it resides within my HTML (which I have close to ZERO editing experience must not be correct).

  6. GIPPE
    Posted 4 years ago #

    Disregard - it now works although I'm not sure what the delayed reaction was caused by.

  7. jwillua
    Posted 4 years ago #

    Thanks for this, i have got it to work but it only plays about 4 to 6 seconds of the song and then stops playing, am i doing something wrong? The file is an M4a file, does that matter?? Thanks.

  8. jwillua
    Posted 4 years ago #

    Fixed it, for some reason it only uploaded partially.

  9. dm.seventy2
    Posted 3 years ago #

    I tried this and got it to work, but how do you get it to only play on the home page?

Topic Closed

This topic has been closed to new replies.

About this Topic