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

Page template scroll down options are not showing in "Page Attributes" section when editing a page.

I'm following Zach in Building Page Templates in Wordpress. I'm trying to add the side bar template, but WP doesn't show the option in the "page attributes" section.

Thanks in advance for the help!

3 Answers

LOL. I spelled it "tamplate" not "template"

ryan95
ryan95
8,964 Points

Make sure you have the template name comment at the top of the page like so:

<?php
/*
Template Name: Sidebar
*/

And the naming convention is: page-sidebar.php

yep. It's all there. That's not the issue.

Here's my page-sidebar-left.php file:

<?php /* Tamplate Name: Left Sidebar */ ?> <?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>
                    <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(); ?>