Title: Create addition template not working
Last modified: August 21, 2016

---

# Create addition template not working

 *  [Shockproof](https://wordpress.org/support/users/shockproof/)
 * (@shockproof)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/)
 * I have the Constructor Theme (Version 1.6.5) for WordPress which I love! I have
   been able to make most of the site easily…great work! My problem is that all 
   the tutorials to make a custom template don’t work for me. I have copied the 
   page.php page and added the ‘Template name:’ comment in the opening PHP tag. 
   I then try to change to the new template but when I view it there is a problem
   in that I can only see plain text menu to the left of page…no CSS nothing!!
 * Any advice?
 * Kind regards Russ Clarke

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Jesin A](https://wordpress.org/support/users/jesin/)
 * (@jesin)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/#post-4156858)
 * Create a page with this “Custom template” and post its URL here.
 *  Thread Starter [Shockproof](https://wordpress.org/support/users/shockproof/)
 * (@shockproof)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/#post-4156860)
 * Hi Jesin
 * Thanks for reply.
 * I am developing it locally but here is a screenshot…[http://shockproof.bpweb.net/test/screen-shot.jpg](http://shockproof.bpweb.net/test/screen-shot.jpg).
   I simply copied the page.php, renamed it to bcgc_home.php…added ‘/*
    Template
   name: BCGC Home */’ at the top. The page code is below…
 * Thanks for looking
 *     ```
       <?php
       /*
       Template name: BCGC Home
       /**
        * @package WordPress
        * @subpackage constructor
        */
       __('BCGC Home', 'constructor'); // required for correct translation
       ?>
       <div id="content" class="box shadow opacity <?php the_constructor_layout_class() ?>">
           <div id="container">
           <?php get_constructor_slideshow(true) ?>
           <?php if (have_posts()) : ?>
               <?php while (have_posts()) : the_post(); global $post; ?>
                   <article <?php post_class(); ?> id="post-<?php the_ID() ?>">
                       <header class="opacity box">
                           <h1><?php the_title(); ?></h1>
                       </header>
                       <div class="entry">
                           <?php the_content(__('Read the rest of this entry &raquo;', 'constructor')) ?>
       				    <?php wp_link_pages(array('before' => '<p class="pages"><strong>'.__('Pages', 'constructor').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
                       </div>
                       <footer>
                           <?php edit_post_link(__('Edit', 'constructor'), '', ' | '); ?>
                           <?php if ($post->post_parent) : $parent_link = get_permalink($post->post_parent); ?>
                           <a href="<?php echo $parent_link; ?>"><?php _e('Back to Parent Page', 'constructor');?></a> |
                           <?php endif; ?>
                           <?php if (get_constructor_option('content', 'date')) { the_date(); echo ' | '; } ?>
                           <?php if (get_constructor_option('content', 'links', 'comments')) {
                               comments_popup_link(
                                   __('No Comments »', 'constructor'),
                                   __('1 Comment »', 'constructor'),
                                   __('% Comments »', 'constructor'),
                                   'comments-link',
                                   __('Comments Closed', 'constructor')
                               );
                           } ?>
                       </footer>
                   </article>
               <?php endwhile; ?>
           <?php else: get_constructor_nothing(); endif; ?>
           </div><!-- id='container' -->
           <?php get_constructor_sidebar(); ?>
       </div><!-- id='content' -->
       ```
   
 *  Thread Starter [Shockproof](https://wordpress.org/support/users/shockproof/)
 * (@shockproof)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/#post-4156874)
 * OK I have worked some of it out. The Constructor theme is slightly different.
   The template pulls layouts from the ‘**/layouts**‘ folder. So I have copied ‘**
   page.php**‘ in the root and called it **cover.php**…it looks like this…
 *     ```
       <?php
       /**
       Template name: Cover
        * @package WordPress
        * @subpackage Constructor
        */
       wp_enqueue_script( 'comment-reply' );
   
       // load header.php
       get_header('cover');
   
       // load one of layout pages (layouts/*.php) based on settings
       get_constructor_layout('cover');
   
       // load footer.php
       get_footer();
       ```
   
 * I have copied **header.php** and called it **header-cover.php** and it is working
   fine. I then copied **layouts/page.php** and renamed it **page-cover.php** but
   it does not pull the layout into the template!! I have also tried naming the 
   layout file just **cover.php**…still no luck. Any ideas…very frustrating!
 *  [Jesin A](https://wordpress.org/support/users/jesin/)
 * (@jesin)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/#post-4156875)
 * You have copied the page.php file which is inside the `layout/` directory. This
   won’t work as expected.
 * First create a [Child theme](http://codex.wordpress.org/Child_Themes). Inside`
   wp-content/themes/constructor-child` create a file called bcgc-home.php and place
   the following code.
 *     ```
       <?php
       /**
       Template Name: BCGC Home
        */
       wp_enqueue_script( 'comment-reply' );
   
       // load header.php
       get_header();
   
       __('Single', 'constructor'); // required for correct translation
       ?>
       <div id="content" class="box shadow opacity <?php the_constructor_layout_class() ?>">
           <div id="container">
           <?php get_constructor_slideshow(true) ?>
           <?php if (have_posts()) : ?>
               <?php while (have_posts()) : the_post(); global $post; ?>
                   <article <?php post_class(); ?> id="post-<?php the_ID() ?>">
                       <header class="opacity box">
                           <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'constructor'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h1>
                       </header>
                       <div class="entry">
                           <?php the_content(__('Read the rest of this entry »', 'constructor')) ?>
       				    <?php wp_link_pages(array('before' => '<p class="pages"><strong>'.__('Pages', 'constructor').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
                       </div>
                       <footer>
                           <?php edit_post_link(__('Edit', 'constructor'), '', ' | '); ?>
                           <?php if ($post->post_parent) : $parent_link = get_permalink($post->post_parent); ?>
                           <a href="<?php echo $parent_link; ?>"><?php _e('Back to Parent Page', 'constructor');?></a> |
                           <?php endif; ?>
                           <?php if (get_constructor_option('content', 'date')) { the_date(); echo ' | '; } ?>
                           <?php if (get_constructor_option('content', 'links', 'comments')) {
                               comments_popup_link(
                                   __('No Comments »', 'constructor'),
                                   __('1 Comment »', 'constructor'),
                                   __('% Comments »', 'constructor'),
                                   'comments-link',
                                   __('Comments Closed', 'constructor')
                               );
                           } ?>
                       </footer>
                   </article>
               <?php endwhile; ?>
               <?php comments_template(); ?>
           <?php else: get_constructor_nothing(); endif; ?>
           </div><!-- id='container' -->
           <?php get_constructor_sidebar(); ?>
       </div><!-- id='content' -->
       <?php
       // load footer.php
       get_footer();
       ```
   
 * Edit it as you want.
 *  Thread Starter [Shockproof](https://wordpress.org/support/users/shockproof/)
 * (@shockproof)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/#post-4156882)
 * Hi Jeslin
 * This doesn’t seem to work. I have read about Child Themes and you have to activate
   them in Appearance>>Themes. When I go there it tells me my child theme is broken
   and needs a stylesheet! Do I import the main theme stylesheet?
 * Russ
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/#post-4156883)
 * See [child themes](http://codex.wordpress.org/Child_Themes).
 *  Thread Starter [Shockproof](https://wordpress.org/support/users/shockproof/)
 * (@shockproof)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/#post-4156884)
 * Hi Jesin
 * I have decided to go down a different root for now. I am going to use the existing‘
   single template and recode it.
 * Thanks for the help…appreciated!
 * Russ
 *  [Jesin A](https://wordpress.org/support/users/jesin/)
 * (@jesin)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/#post-4156886)
 * Hi Russ,
 * Whatever you do inside `wp-content/themes/constructor` will be overwritten when
   you update your theme. This includes newly created files in this directory.
 * You need to have the following inside `wp-content/themes/constructor-child/style.
   css`
 *     ```
       /*
       Theme Name: Constructor Child
       Template: constructor
       */
       @import url('../constructor/style.css');
       ```
   
 *  Thread Starter [Shockproof](https://wordpress.org/support/users/shockproof/)
 * (@shockproof)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/#post-4156891)
 * Hi Jesin
 * OK I think I have got it sorted now. Thank you for the help. I have setup the
   child theme and although I had to re do the sidebar widgets everything seems 
   to be working OK.
 * cheers
 * Russ

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Create addition template not working’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/constructor/1.6.5/screenshot.png)
 * Constructor
 * [Support Threads](https://wordpress.org/support/theme/constructor/)
 * [Active Topics](https://wordpress.org/support/theme/constructor/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/constructor/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/constructor/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [Shockproof](https://wordpress.org/support/users/shockproof/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/create-addition-template-not-working/#post-4156891)
 * Status: not resolved