WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating two websites, one radio station and one bands website. I want to add a player (already have a php with the player in it) to the top of the page, like a frame.

The main point is to have the player playing music while people can navigate to other pages without interrupting the player.

I've created the following:

<frameset framespacing="0" border="0" frameborder="0" rows="*,65">
    <frame name="main" target="_self" src="http://www.website.com/index.php" scrolling="auto">
    <frame name="footer" scrolling="no" noresize="noresize" src="http://www.website.com/player">

However this creates a loop.

share|improve this question
What do you mean "a loop"? An audio loop? If so, it doesn't has to do with WordPress. – brasofilo Oct 17 '12 at 23:37
No, not an audio loop. The bottom iframe starts duplicating on top of itself. – Antonio Couto Oct 18 '12 at 1:27
Rather than using a frame why not give your users the ability to pop the player out in a new window. This will give your users more control if they want to listen to it through out the whole site, while browsing other sites or the ability not to. Know what I mean? – Nicole Oct 18 '12 at 14:31
Nicole, thanks for the suggestion. That'd be plan B, I think it will better for the audio to auto-start and not have the user looking for a link to play anything. – Antonio Couto Oct 18 '12 at 20:56
up vote 1 down vote accepted

Child theme for TwentyEleven:

  • create the child theme folder, twentyhalf
  • create a style.css file with the content:
Theme Name: Framed Audio
Theme URI: http://wordpress.stackexchange.com/questions/69624
Version: 1.0
Description: Index page with framed content - one frame points to a parent page with the slug of 'sample-page' and the other for a folder at the root level named 'radio'
Template: twentyeleven
@import url("../twentyeleven/style.css");
  • copy the parent theme index.php into the child theme folder
  • substitute get_header() and get_sidebar() + get_footer() with the parent content of header.php and footer.php, and adapt to suit your site's framed Front Page
  • set the "Front page display" in Reading Settings (/wp-admin/options-reading.php) to "Your latest posts".
  • /sample-page/ is the slug of a WordPress page with the "true" first WP page. For exhibiting a "blog" page some template/shortcode will be needed.
  • /radio/ is an actual folder with an index.html containing the audio player. 

Sample index.php for the child theme

 * The main template file.
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title>HAND WRITTEN TITLE</title>
<?php wp_head(); ?>

<frameset rows="*,65" frameborder="0" border="0" framespacing="0">
<frame name="main" src="<?php bloginfo( 'url' ); ?>/sample-page/" marginheight="0" marginwidth="0" scrolling="auto" noresize>
<frame name="footer" src="<?php bloginfo( 'url' ); ?>/radio/" marginheight="0" marginwidth="0" scrolling="no" noresize>


Attention to the "Home" link in the navigation menus: this one must be directed to the frame "main", otherwise the frameset will duplicate the footer.


share|improve this answer
Hmm, being playing with this for a while, can't seem to get it to work yet. Can you elaborate what main is? Is it a folder? Also, to confirm, this goes inside the THEME's index? – Antonio Couto Oct 18 '12 at 13:15
I've updated the Q with better naming examples, and explicit index.php file reference. – brasofilo Oct 18 '12 at 13:29
@AntonioCouto Ok, answer rewritten with working child theme example. Good luck! – brasofilo Oct 18 '12 at 16:04
Thanks! I'll try tonight again! – Antonio Couto Oct 18 '12 at 20:54
@brasofolio, you mentioned to create an index.php in the childs theme from the parent theme, but then also to rewrite it again with the frames. Did i miss something? – Antonio Couto Oct 18 '12 at 21:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.