Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

How to make pages wider to accomodate sidebars on 2011 child theme?

the site was created by a third party without sidebars.  I now want to add them and can do so with the Twenty Eleven Theme Extension plugin.  However the width of the page is not sufficient to place the sidebars.  Any widget I add to the sidebar is placed over the page text.  I think I need to make the page either wider or multi column.  this is the code in the home-page.php

<?php
/**
 * Template Name: Home Page
 *
 */

wp_enqueue_script('jquery');

get_header(); ?>

<script type="text/javascript">

jQuery('body').removeClass('singular');

</script>

		<div id="primary">
			<div id="content" class="myhome" role="main">

				<div id="slider"><?php if (function_exists("easing_slider")){ easing_slider(); }; ?></div>
                <div id="home-content">
                	<h1 class="entry-title"></h1>
                    <?php the_post(); the_content(); ?>
                </div>
                <div id="bottom-box">
                	<div id="box-1">                    	
                        <?php dynamic_sidebar( 'box-1' ); ?>
                    </div>
                    <div id="box-2">
                    	<?php dynamic_sidebar( 'box-2' ); ?>
                    </div>
                    <div id="box-3">
                    	<?php dynamic_sidebar( 'box-3' ); ?>
                    </div>
                </div>

			</div><!-- #content -->
		</div><!-- #primary -->

<?php get_footer(); ?>

Open in new window

0
leachj
Asked:
leachj
  • 4
1 Solution
 
Jason C. LevineNo oneCommented:
Just copy page.php from the parent TwentyEleven directory to the child directory.  That will add a page template to the child and the sidebars should be accessible.
0
 
leachjAuthor Commented:
One already exists.  

<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */

wp_enqueue_script('jquery');

get_header(); ?>

<script type="text/javascript">

jQuery('body').removeClass('singular');

</script>

            <div id="primary">
       
              <div id="page-banner"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/page-banner.jpg"></div>
           
            <div id="wrapper">
       
                <div id="content" class="mypage" role="main">
   
                    <?php while ( have_posts() ) : the_post(); ?>
   
                        <?php get_template_part( 'content', 'page' ); ?>
   
                        <?php //comments_template( '', true ); ?>
   
                    <?php endwhile; // end of the loop. ?>
   
                </div><!-- #content -->
               
                <?php get_sidebar(); ?>
               
            </div><!-- #wrapper -->
               
            </div><!-- #primary -->
     
<?php get_sidebar(); ?>
<?php get_footer(); ?>
0
 
leachjAuthor Commented:
Also there is a no-sidebar-page.php

<?php
/**
 * Template Name: No Sidebar Page
 *
 */

wp_enqueue_script('jquery');

get_header(); ?>

<script type="text/javascript">

jQuery('body').removeClass('singular');

</script>

            <div id="primary">
       
              <div id="page-banner"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/page-banner.jpg"></div>
       
                  <div id="wrapper">
       
                <div id="content" class="myhome" role="main">
   
                    <?php while ( have_posts() ) : the_post(); ?>
   
                        <?php get_template_part( 'content', 'page' ); ?>
   
                        <?php //comments_template( '', true ); ?>
   
                    <?php endwhile; // end of the loop. ?>
   
                </div><!-- #content -->
               
            </div><!-- #wrapper -->
            </div><!-- #primary -->

<?php get_footer(); ?>
0
 
leachjAuthor Commented:
please close this question
0
 
leachjAuthor Commented:
There has been no resolution.  I will try to open a new thread.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now