Embed Music On Word Press

Embed Music On Word Press

This method is a popular way to play a sound or music file because it allows for many options. The sound interface will be placed right on the page and can be configured to start automatically, repeat over and over, or just play through once. So, how do you do it? With the <embed> tag. You will need to specify the source of the sound file and add additional commands as needed.

Here is an example using multiple commands, I have chosen to hide the player and I want the music to loop play on the page over and over, I have also added a volume setting.  I am not using the hidden value’s but I have set the width and height = 0

<embed src= “MP3 URL HERE” autostart=”true” loop=”true” volume=”50%” height=”0″ width=”0″></embed>

This tells the browser to place this file on the page right where you placed the tag. You don’t have to use a mp3 file, you can embed a midi, wav, aud, mp3 and most other sound formats in this way. As you can see, the src= is asking for the source of the mp3 file, or its Internet address. Just type in the Web address of your file here.

You can add commands to the tag to control the output and appearance of your sound file. Here are some common commands.

width=”120 ”
Tells the browser how wide you wish the sound display to be. Input a number in pixels.

height=”40″
Tells the browser how tall you want the sound display to be. Input a number in pixels.

autostart=”true”
Instructs the browser to begin playing the file automatically once it has been loaded on the page. You can set this value to true or false.

loop=”true”
Instructs the browser to play the file over and over again for as long as someone is on that page, or until the user hits the stop button on the display. You can set this value to true or false.

hidden=”true”
This command tells the browser to hide the sound display so people viewing your page don’t see the sound display with the control buttons. The sound plays as though it were just in the background somewhere. You can set this to true or false.

Note - Once you have embedded this code you can corrupt the code if you go into edit the page, always make a back up copy in notepad and save it so you can reload it before you exit the page after making changes.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

Leave a Reply