The topic of sounds on a webpage is a delicate thing. They can be very irritating if not tastefully implemented.
You're looking for a case where you want it to appear only on the home page, most likely. And then probably only want it to sound "once" per visit. Or a combination of both ... it can sound on "any" page, but only once per visit. (You could get corny and have it sound on checkout-success too ... but that's stretching things.)
To do something like this would require custom coding, and the support of cookies in the customers' browser:
- on every page, the system checks for the cookie -- if set, skip playing the sound.
- if none is set, or exists but is expired, then play the sound
You could alternatively use PHP sessions to do a similar detection, which removes the cookie requirement, making your site more friendly to more security-conscious folks.
To do this, I'd suggest something *like* this, which you'll have to refine to your needs:
/includes/templates/YOURTEMPLATE/common/tpl_footer.php
at the very bottom, you'd add the code, which would look something like this:
Code:
<?php
if (!isset($_SESSION['play_welcome'])) {
$_SESSION['play_welcome'] = 1;
?>
.........insert HTML code to play the sound here .......
<?php
}
?>
You'll need to research the most correct and cross-browser-compatible HTML code to use for playing the sound. Some browsers work well with an EMBED tag. Other browsers ignore those.
Oh ... and be sure the sound isn't too loud or obnoxious when recording it. Otherwise you may wonder why folks don't stick around online.