Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress Theme Development Building Page Templates in WordPress Creating Custom Page Templates in WordPress

In my page Attributes, there is no template. What could be the cause for this?

I've tried looking through the wordpress page template section for references but still having the same problem of the template section not appearing.

Just figured it out. So, I thought maybe my theme wasn't updating so I deactivated it and then re activated it. Upon this, I noticed that a warning sign had popped up saying my theme had no style sheet. Looked into my function.php page and noticed I had added an s on the style.css directory. Fixed that, reactivated page and now I see the tab on attributes, that now says templates.

Ashenafi Ashebo
Ashenafi Ashebo
15,021 Points

May be you didn't close the codes properly.

check this one, all the codes are properly closed. Then you will see template sidebare.

<?php

/* Template Name: Left sidebare */

?>

<?php get_header(); ?>

<section class="two-column row no-max pad">
    <div class="small-12 columns">
        <div class="row">
      <!-- Primary Column -->
            <div class="small-12 medium-7 medium-offset-1 medium-push-4 columns">
                <div class="primary">

                                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

                                      <h1><?php the_title(); ?></h1>
                                      <hr>
                                      <p><?php the_content(); ?></p>  

                                <?php endwhile; else : ?>

                                    <p><?php _e( 'Sorry, no pages found.' ); ?></p>

                                <?php endif; ?>       

                </div> 

            </div>    
      <!-- Secondary Column -->
                 <div class="small-12 medium-4 medium-pull-8 columns">
                       <div class="secondary">
                          <h2 class="module-heading">Sidebar</h2>
                      </div>
                 </div>
        </div>
    </div>
</section>

<?php get_footer(); ?>