![]() | | ||||||||
| | #1 |
| Advanced Warrior War Room Member Join Date: May 2008 Location: Swansea, South Wales, UK
Posts: 981
Thanks: 512
Thanked 182 Times in 123 Posts
|
Hi guys Wondering if anyone has done this. I have a client who wants one piece of music to play but only on the home page not on all the other pages, it's an mp3 file and I have got a good plugin that allows me to post the music in the sidebar or in a post/page but have not been able to find a way to have it just on the home page. I am thinking perhaps I put something in the home.php. Does anyone know what code would make that happen and where to put it? Thanks for any help Sue |
| One-to-One WordPress Coaching Service Available at Low Hourly Rate - Let the frustration end now! WordPress Installs, Theme Design, Site Tweaks & other WordPress services available | |
| | |
| | #2 |
| Active Warrior War Room Member Join Date: Oct 2008 Location: Florida
Posts: 43
Thanks: 2
Thanked 8 Times in 8 Posts
|
Hi Susanne, I assume you mean you are using Wordpress since you talk about post/page, sidebar, and home.php. There are a couple of way you can do this. One, as you state, is putting the player/code somewhere on the home page so that it is only loaded when someone goes there. The second is a bit more complicated, but if you enjoy the player in the sidebar, but only want it on the homepage, you can create a sidebar for specifically for the home.php file and leave it off the regular sidebar that is displayed on all of the other pages. Just rename the homepage sidebar to something like sidebarhome.php and replace <?php include(TEMPLATEPATH."/sidebar.php");?> in your home.php file to <?php include(TEMPLATEPATH."/sidebarhome.php");?> Enjoy |
|
Learn to Make Money Online for FREE (no gimmicks/no upsells) | Try Niche Finder - Its Free
| |
| | |
| | #3 | |
| Advanced Warrior War Room Member Join Date: May 2008 Location: Swansea, South Wales, UK
Posts: 981
Thanks: 512
Thanked 182 Times in 123 Posts
| Quote:
Yes I am using Wordpress sorry I forgot to mention that in my original post. I would like to do the first method, putting code into the existing home.php because I don't want to mess with the theme too much by creating other files and you mention it can be done that way but what I need to know is where would the code go and what would the code be? I don't want to put the plugin into the home.php just make it so that one piece of music plays when someone lands on the home page and not on any other page in the site. Got any ideas of what code to use and where to put it in the home.php? Cheers and thanks for your help. Sue | |
| One-to-One WordPress Coaching Service Available at Low Hourly Rate - Let the frustration end now! WordPress Installs, Theme Design, Site Tweaks & other WordPress services available | ||
| | |
| | #4 |
| Senior Warrior Member War Room Member Join Date: Sep 2008 Location: Honolulu, Hawaii, USA & Montreal Canada
Posts: 2,218
Blog Entries: 1 Thanks: 759
Thanked 724 Times in 505 Posts
|
Hi Sue The basic HTML for embedding an MP3 file on your page is as follows: Code: <EMBED src="file.mp3" autostart=true hidden=true> If you want to embed an MP3 player on your Home Page there are several ways of doing that - this article illustrates 3 common methods: How to Embed MP3 Audio Files In Web Pages With Google or Yahoo! Flash Player Bill |
| | |
| | #5 |
| Advanced Warrior War Room Member Join Date: May 2008 Location: Swansea, South Wales, UK
Posts: 981
Thanks: 512
Thanked 182 Times in 123 Posts
|
Brilliant Bill and thanks! All of those options are exactly what I need. I did do some searching around myself before coming here to ask but I probably was not asking the right questions in search LOL. Thanks so much for your help. Sue |
| One-to-One WordPress Coaching Service Available at Low Hourly Rate - Let the frustration end now! WordPress Installs, Theme Design, Site Tweaks & other WordPress services available | |
| | |
| | #6 |
| HyperActive Warrior Join Date: Sep 2009 Location: Currently in Mexico
Posts: 273
Thanks: 50
Thanked 43 Times in 30 Posts
|
please, please, please try to talk him out of this. I have yet to meet anyone who like it when music is playing on a website unless they're on a specific artist site. In fact, I'd estimate that over 80% of the people I've talked to about this have said that audio/video playing will make them immediately leave a site unless it's very obvious how to turn it off. So, unless your client is a musician, IMO they should really rethink this music thing because from what I've read it's one of the fastest ways to get people to leave your site. Just my $.02. |
| | |
| | #7 | |
| Advanced Warrior War Room Member Join Date: May 2008 Location: Swansea, South Wales, UK
Posts: 981
Thanks: 512
Thanked 182 Times in 123 Posts
| Quote:
![]() Yes I am aware of this and did in fact make the suggestion but he really wants this and as this is for a "Drag Queen" (entertainer) it is kind of normal for that kind of site (did some research).. however the nice thing about the option Bill posted for me, I just finished inserting the google player option is that now the visitor has to click the play button for the music to play and all I did was add "Play me..." above it which I think is very cute and gives a nice compromise ![]() Thanks again though, Sue | |
| One-to-One WordPress Coaching Service Available at Low Hourly Rate - Let the frustration end now! WordPress Installs, Theme Design, Site Tweaks & other WordPress services available | ||
| | |
![]() |
|
| Tags |
| home, music, page, play |
| Thread Tools | |
| |
![]() |