Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1043930

    skylar_kershner
    Participant

    My website is http://www.JohnsonRealEstateInc.com

    I am wondering if there is a way to automatically make a song play upon visitors landing on my website homepage?

    If so how would i go about this?

    #1043940

    Rahul
    Moderator

    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. You can upload it through Dashboard > Media.
    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"/>

    #1043978

    skylar_kershner
    Participant

    Where do i go to modify HTML of my homepage?

    #1044168

    John Ezra
    Member

    Hi there,

    Thanks for updating the thread! Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Once you have that setup, find and copy this file:

    /wp-content/themes/x/framework/views/global/_header.php

    then paste in the same directory structure but this time in your child theme

    /wp-content/themes/x-child/framework/views/global/_header.php

    then open and edit that file in your child theme. You will see the <head> section starting on line 15.

    Just put the previous code example there with your correct link to you file.

    Let us know how that goes. Hope this helps – thanks!