Skip to main content
edited tags
Link
Chip Bennett
  • 55.1k
  • 8
  • 90
  • 170
Source Link

Trouble in creating a custom template on twentyeleven theme

I am trying to extend the twentyeleven theme's sidebar template. My custom template (its incomplete) is as follows:

<?php
/**
 * Template Name: Quote Request
 * Description: A Page Template that is a free quote request form
 *
 * @package WordPress
 * @subpackage Twenty_Eleven (Custom)
 * @since Twenty Eleven 1.c
 */ 
get_header(); ?>

        <div id="primary">
            <div id="content" 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><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

I just name a copy of sidebar-page.php which I belive is used for creating Sidebar template pages. But I don't get the intended results. Here is what I get:

My template result

But when I select the sidebar template from the editor, I get:

Sidebar template

I am trying to acheive this before I add my custom page elements. Can somebody point me to correct direction? I am just starting on wordpress.