Solved

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

Posted on 2014-02-19
5
191 Views
Last Modified: 2014-03-19
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
Comment
Question by:leachj
  • 4
5 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39870954
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
 

Author Comment

by:leachj
ID: 39871069
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
 

Author Comment

by:leachj
ID: 39871072
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
 

Accepted Solution

by:
leachj earned 0 total points
ID: 39929259
please close this question
0
 

Author Closing Comment

by:leachj
ID: 39939090
There has been no resolution.  I will try to open a new thread.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I want to start by talking about the use of plug-ins for WordPress. I started a web-site for a company I was working for a few years ago; I had extremely basic knowledge of HTML. I am a Graphic Designer by trade so I invited the opportunity as a cha…
WordPress is constantly evolving, and with each evolution appears to get better and better.  One of the big drawbacks prior to version 3 was that there was no way to be able to set up a custom menu from the backend. The Old Way Adding menus is…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now